wx.FileCtrlEvent¶
A file control event holds information about events associated with wx.FileCtrl objects.
Events Emitted by this Class¶
Handlers bound for the following event types will receive a wx.FileCtrlEvent parameter.
EVT_FILECTRL_FILEACTIVATED: The user activated a file(by double-clicking or pressing Enter)
EVT_FILECTRL_SELECTIONCHANGED: The user changed the current selection(by selecting or deselecting a file)
EVT_FILECTRL_FOLDERCHANGED: The current folder of the file control has been changed
EVT_FILECTRL_FILTERCHANGED: The current file filter of the file control has been changed
Class Hierarchy¶
Methods Summary¶
Constructor. |
|
Returns the current directory. |
|
Returns the file selected (assuming it is only one file). |
|
Returns the files selected. |
|
Returns the current file filter index. |
|
Sets the directory of this event. |
|
Sets the files changed by this event. |
|
Sets the filter index changed by this event. |
Properties Summary¶
See |
|
See |
|
See |
Class API¶
- class wx.FileCtrlEvent(CommandEvent)¶
Possible constructors:
FileCtrlEvent(type, evtObject, id) -> None
A file control event holds information about events associated with FileCtrl objects.
Methods¶
- __init__(self, type, evtObject, id)¶
Constructor.
- Parameters:
type (wx.EventType)
evtObject (wx.Object)
id (int)
- Return type:
None
- GetDirectory(self)¶
Returns the current directory.
In case of a
EVT_FILECTRL_FOLDERCHANGED
, this method returns the new directory.- Return type:
str
- GetFile(self)¶
Returns the file selected (assuming it is only one file).
- Return type:
str
- GetFiles(self)¶
Returns the files selected.
In case of a
EVT_FILECTRL_SELECTIONCHANGED
, this method returns the files selected after the event.- Return type:
List[str]
- GetFilterIndex(self)¶
Returns the current file filter index.
For a
EVT_FILECTRL_FILTERCHANGED
event, this method returns the new file filter index.- Return type:
int
Added in version 2.9.1.
- SetDirectory(self, directory)¶
Sets the directory of this event.
- Parameters:
directory (string)
- Return type:
None
- SetFiles(self, files)¶
Sets the files changed by this event.
- Parameters:
files (list of strings)
- Return type:
None
- SetFilterIndex(self, index)¶
Sets the filter index changed by this event.
- Parameters:
index (int)
- Return type:
None
Added in version 2.9.1.
Properties¶
- Directory¶
See
GetDirectory
andSetDirectory
- FilterIndex¶
See
GetFilterIndex
andSetFilterIndex