.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.FileCtrlEvent:
==========================================================================================================================================
|phoenix_title| **wx.FileCtrlEvent**
==========================================================================================================================================
A file control event holds information about events associated with :ref:`wx.FileCtrl` objects.
.. _FileCtrlEvent-events:
|events| Events Emitted by this Class
=====================================
Handlers bound for the following event types will receive a :ref:`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| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
FileCtrlEvent:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.FileCtrlEvent.__init__` Constructor.
:meth:`~wx.FileCtrlEvent.GetDirectory` Returns the current directory.
:meth:`~wx.FileCtrlEvent.GetFile` Returns the file selected (assuming it is only one file).
:meth:`~wx.FileCtrlEvent.GetFiles` Returns the files selected.
:meth:`~wx.FileCtrlEvent.GetFilterIndex` Returns the current file filter index.
:meth:`~wx.FileCtrlEvent.SetDirectory` Sets the directory of this event.
:meth:`~wx.FileCtrlEvent.SetFiles` Sets the files changed by this event.
:meth:`~wx.FileCtrlEvent.SetFilterIndex` Sets the filter index changed by this event.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.FileCtrlEvent.Directory` See :meth:`~wx.FileCtrlEvent.GetDirectory` and :meth:`~wx.FileCtrlEvent.SetDirectory`
:attr:`~wx.FileCtrlEvent.File` See :meth:`~wx.FileCtrlEvent.GetFile`
:attr:`~wx.FileCtrlEvent.Files` See :meth:`~wx.FileCtrlEvent.GetFiles` and :meth:`~wx.FileCtrlEvent.SetFiles`
:attr:`~wx.FileCtrlEvent.FilterIndex` See :meth:`~wx.FileCtrlEvent.GetFilterIndex` and :meth:`~wx.FileCtrlEvent.SetFilterIndex`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.FileCtrlEvent(CommandEvent)
**Possible constructors**::
FileCtrlEvent(type : EventType, evtObject : Object, id : int) -> None
A file control event holds information about events associated with
FileCtrl objects.
.. method:: __init__(self, type : EventType, evtObject : Object, id : int)
Constructor.
:param `type`:
:type `type`: wx.EventType
:param `evtObject`:
:type `evtObject`: wx.Object
:param `id`:
:type `id`: int
:rtype: `None`
.. method:: GetDirectory(self)
Returns the current directory.
In case of a ``EVT_FILECTRL_FOLDERCHANGED``, this method returns the new directory.
:rtype: `str`
.. method:: GetFile(self)
Returns the file selected (assuming it is only one file).
:rtype: `str`
.. method:: GetFiles(self)
Returns the files selected.
In case of a ``EVT_FILECTRL_SELECTIONCHANGED``, this method returns the files selected after the event.
:rtype: `List[str]`
.. method:: GetFilterIndex(self)
Returns the current file filter index.
For a ``EVT_FILECTRL_FILTERCHANGED`` event, this method returns the new file filter index.
:rtype: `int`
.. versionadded:: 2.9.1
.. method:: SetDirectory(self, directory : str)
Sets the directory of this event.
:param `directory`:
:type `directory`: string
:rtype: `None`
.. method:: SetFiles(self, files : List[str])
Sets the files changed by this event.
:param `files`:
:type `files`: list of strings
:rtype: `None`
.. method:: SetFilterIndex(self, index : int)
Sets the filter index changed by this event.
:param `index`:
:type `index`: int
:rtype: `None`
.. versionadded:: 2.9.1
.. attribute:: Directory
See :meth:`~wx.FileCtrlEvent.GetDirectory` and :meth:`~wx.FileCtrlEvent.SetDirectory`
.. attribute:: File
See :meth:`~wx.FileCtrlEvent.GetFile`
.. attribute:: Files
See :meth:`~wx.FileCtrlEvent.GetFiles` and :meth:`~wx.FileCtrlEvent.SetFiles`
.. attribute:: FilterIndex
See :meth:`~wx.FileCtrlEvent.GetFilterIndex` and :meth:`~wx.FileCtrlEvent.SetFilterIndex`