Inheritance diagram for wx.GenericDirCtrl:
This control can be used to place a directory listing (with optional files) on an arbitrary window.
The control contains a wx.TreeCtrl window representing the directory hierarchy, and optionally, a wx.Choice window containing a list of filters.
Window Style | Description |
---|---|
wx.DIRCTRL_DIR_ONLY | Only show directories, and not files. |
wx.DIRCTRL_3D_INTERNAL | Use 3D borders for internal controls. |
wx.DIRCTRL_SELECT_FIRST | When setting the default path, select the first file in the directory. |
wx.DIRCTRL_SHOW_FILTERS | Show the drop-down filter list. |
wx.DIRCTRL_EDIT_LABELS | Allow the folder and file labels to be editable. |
Constructor.
Parameters:
Returns:
Collapse the given path.
Parameters:
Returns:
bool
Tries to expand as much of the given path as possible, so that the filename or directory is visible in the tree control.
Parameters:
Returns:
bool
Find the child that matches the first part of path. E.g. if a child path is “/usr” and path is “/usr/include” then the child for “/usr” is returned.
If the path string has been used (we’re at the leaf), done is set to True.
Parameters:
Returns:
(item, done)
Gets the default path.
Returns:
string
Parameters:
Returns:
Gets selected filename path only (else empty string).
This function doesn’t count a directory as a selection.
Returns:
string
Returns the filter string.
Returns:
string
Returns the current filter index (zero-based).
Returns:
int
Returns a pointer to the filter list control (if present).
Returns:
wx.DirFilterListCtrl
Gets the currently-selected directory or filename.
Returns:
string
Returns the root id for the tree control.
Returns:
Returns a pointer to the tree control.
Returns:
Sets the default path.
Parameters:
Sets the filter string.
Parameters:
Sets the current filter index (zero-based).
Parameters:
Sets the current path.
Parameters:
Parameters: