.. 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.

Event macros: 

- 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

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>FileCtrlEvent</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.FileCtrlEvent_inheritance.png" alt="Inheritance diagram of FileCtrlEvent" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.FileCtrlEvent.html" title="wx.FileCtrlEvent" alt="" coords="17,237,143,267"/> <area shape="rect" id="node2" href="wx.CommandEvent.html" title="wx.CommandEvent" alt="" coords="5,160,155,189"/> <area shape="rect" id="node3" href="wx.Event.html" title="wx.Event" alt="" coords="39,83,121,112"/> <area shape="rect" id="node4" href="wx.Object.html" title="wx.Object" alt="" coords="37,5,123,35"/> </map> 
   </p>
   </div>

|


|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, evtObject, id)
       
   
   A file control event holds information about events associated with
   FileCtrl objects.



   .. method:: __init__(self, type, evtObject, id)

      Constructor.                  


      :param `type`: 
      :type `type`: wx.EventType
      :param `evtObject`: 
      :type `evtObject`: wx.Object
      :param `id`: 
      :type `id`: int







   .. method:: GetDirectory(self)

      Returns the current directory.                  

      In case of a ``EVT_FILECTRL_FOLDERCHANGED``, this method returns the new directory.                  

      :rtype: `string`








   .. method:: GetFile(self)

      Returns the file selected (assuming it is only one file).                  

      :rtype: `string`








   .. 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 of strings`








   .. 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)

      Sets the directory of this event.                  


      :param `directory`: 
      :type `directory`: string







   .. method:: SetFiles(self, files)

      Sets the files changed by this event.                  


      :param `files`: 
      :type `files`: list of strings







   .. method:: SetFilterIndex(self, index)

      Sets the filter index changed by this event.                  

                


      :param `index`: 
      :type `index`: int






      .. 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`

