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

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

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

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.

Event macros: 

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






         



.. note:: 

   Windows only until version 2.8.9, available on all platforms since 2.8.10.  







.. seealso:: :ref:`Events and Event Handling <events and event handling>`, :meth:`wx.Window.DragAcceptFiles`     







|

|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="wx.DropFilesEvent" alt="" coords="5,160,148,189"/> <area shape="rect" id="node2" href="wx.Event.html" title="wx.Event" alt="" coords="35,83,118,112"/> <area shape="rect" id="node3" href="wx.Object.html" title="wx.Object" alt="" coords="33,5,120,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: :ref:`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`

