.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.DropFilesEvent:

==========================================================================================================================================
|phoenix_title|  **wx.DropFilesEvent**
==========================================================================================================================================

This class is used for drop files events, that is, when files have been dropped onto the window.          

This functionality is currently only available under Windows. 

The window must have previously been enabled for dropping by calling :meth:`wx.Window.DragAcceptFiles` . 

Important note: this is a separate implementation to the more general drag and drop implementation documented in the :ref:`Drag and Drop Overview <drag and drop overview>`. It uses the older, Windows message-based approach of dropping files. 







.. _DropFilesEvent-events:

|events| Events Emitted by this Class
=====================================

Handlers bound for the following event types will receive a :ref:`wx.DropFilesEvent` parameter.

 

- EVT_DROP_FILES: Process a  ``wxEVT_DROP_FILES``   event.   

MSW port.  








         



.. availability:: Only available for MSW.  







.. seealso:: :ref:`Events and Event Handling <events and event handling>`    







|

|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>DropFilesEvent</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.DropFilesEvent_inheritance.png" alt="Inheritance diagram of DropFilesEvent" 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.DropFilesEvent.html" title="This class is used for drop files events, that is, when files have been dropped onto the window." alt="" coords="5,160,151,189"/> <area shape="rect" id="node2" href="wx.Event.html" title="An event is a structure holding information about an event passed to a callback or member function." alt="" coords="37,83,119,112"/> <area shape="rect" id="node3" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="34,5,122,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.DropFilesEvent.__init__`                                              Constructor.
:meth:`~wx.DropFilesEvent.GetFiles`                                              Returns an array of filenames.
:meth:`~wx.DropFilesEvent.GetNumberOfFiles`                                      Returns the number of files dropped.
:meth:`~wx.DropFilesEvent.GetPosition`                                           Returns the position at which the files were dropped.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.DropFilesEvent.Files`                                                 See :meth:`~wx.DropFilesEvent.GetFiles`
:attr:`~wx.DropFilesEvent.NumberOfFiles`                                         See :meth:`~wx.DropFilesEvent.GetNumberOfFiles`
:attr:`~wx.DropFilesEvent.Position`                                              See :meth:`~wx.DropFilesEvent.GetPosition`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.DropFilesEvent(Event)

   **Possible constructors**::

       DropFilesEvent(id=0, files=None)
       
   
   This class is used for drop files events, that is, when files have
   been dropped onto the window.



   .. method:: __init__(self, id=0, files=None)

      Constructor.                  


      :param `id`: 
      :type `id`: wx.EventType
      :param `noFiles`: 
      :type `noFiles`: int
      :param `files`: 
      :type `files`: string







   .. method:: GetFiles(self)

      Returns an array of filenames.                  

      :rtype: `PyObject`     








   .. method:: GetNumberOfFiles(self)

      Returns the number of files dropped.                  

      :rtype: `int`








   .. method:: GetPosition(self)

      Returns the position at which the files were dropped.                  

      Returns an array of filenames.                  

      :rtype: :ref:`wx.Point`








   .. attribute:: Files

      See :meth:`~wx.DropFilesEvent.GetFiles`


   .. attribute:: NumberOfFiles

      See :meth:`~wx.DropFilesEvent.GetNumberOfFiles`


   .. attribute:: Position

      See :meth:`~wx.DropFilesEvent.GetPosition`