Inheritance diagram for wx.DirPickerCtrl:
This control allows the user to select a directory. The generic implementation is a button which brings up a wx.DirDialog when clicked. Native implementation may differ but this is usually a (small) widget which give access to the dir-chooser dialog.
It is only available if wx.USE_DIRPICKERCTRL is set to 1 (the default).
See also
Window Style | Description |
---|---|
wx.DIRP_DEFAULT_STYLE | The default style: includes wx.DIRP_DIR_MUST_EXIST and, under wxMSW only, wx.DIRP_USE_TEXTCTRL. |
wx.DIRP_USE_TEXTCTRL | Creates a text control to the left of the picker button which is completely managed by the wx.DirPickerCtrl and which can be used by the user to specify a path (see SetPath). The text control is automatically synchronized with button’s value. |
wx.DIRP_DIR_MUST_EXIST | Creates a picker which allows to select only existing directories. wxGTK control always adds this flag internally as it does not support its absence. |
wx.DIRP_CHANGE_DIR | Change current working directory on each user directory selection change. |
Event Name | Description |
---|---|
wx.EVT_DIRPICKER_CHANGED(id, func) | The user changed the directory selected in the control either using the button or using text control (see wx.DIRP_USE_TEXTCTRL; note that in this case the event is fired only if the user’s input is valid, e.g. an existing directory path). |
Constructor.
Parameters:
Returns:
Parameters:
Returns:
bool
Returns the absolute path of the currently selected directory.
Returns:
string
Sets the absolute path of the currently selected directory. This must be a valid directory if wx.DIRP_DIR_MUST_EXIST style was given.
Parameters: