.. include:: headings.inc .. _DropFilesEvent: ========================================================================================================================================== |phoenix_title| **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:`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 `. 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:`DropFilesEvent` parameter. - EVT_DROP_FILES: Process a ``wxEVT_DROP_FILES`` event. MSW port. .. availability:: Only available for MSW. .. seealso:: :ref:`Events and Event Handling ` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **DropFilesEvent** .. raw:: html

Inheritance diagram of DropFilesEvent

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~DropFilesEvent.__init__` Constructor. :meth:`~DropFilesEvent.GetFiles` Returns an array of filenames. :meth:`~DropFilesEvent.GetNumberOfFiles` Returns the number of files dropped. :meth:`~DropFilesEvent.GetPosition` Returns the position at which the files were dropped. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~DropFilesEvent.Files` See :meth:`~DropFilesEvent.GetFiles` :attr:`~DropFilesEvent.NumberOfFiles` See :meth:`~DropFilesEvent.GetNumberOfFiles` :attr:`~DropFilesEvent.Position` See :meth:`~DropFilesEvent.GetPosition` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: DropFilesEvent(Event) This class is used for drop files events, that is, when files have been dropped onto the window. **Possible constructors**:: DropFilesEvent(id=0, files=None) .. method:: __init__(self, id=0, files=None) Constructor. :param `id`: :type `id`: 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:`Point` .. attribute:: Files See :meth:`~DropFilesEvent.GetFiles` .. attribute:: NumberOfFiles See :meth:`~DropFilesEvent.GetNumberOfFiles` .. attribute:: Position See :meth:`~DropFilesEvent.GetPosition`