.. 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 `. 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. ^^ .. note:: Windows only until version 2.8.9, available on all platforms since 2.8.10. .. seealso:: :ref:`Events and Event Handling `, :meth:`wx.Window.DragAcceptFiles` | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class DropFilesEvent:
| |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`