.. include:: headings.inc .. _WindowDestroyEvent: ========================================================================================================================================== |phoenix_title| **WindowDestroyEvent** ========================================================================================================================================== This event is sent as early as possible during the window destruction process. For the top level windows, as early as possible means that this is done by :ref:`Frame` or :ref:`Dialog` destructor, i.e. after the destructor of the derived class was executed and so any methods specific to the derived class can't be called any more from this event handler. If you need to do this, you must call :meth:`Window.SendDestroyEvent` from your derived class destructor. For the child windows, this event is generated just before deleting the window from :meth:`Window.Destroy` (which is also called when the parent window is deleted) or from the window destructor if operator ``delete`` was used directly (which is not recommended for this very reason). It is usually pointless to handle this event in the window itself but it ca be very useful to receive notifications about the window destruction in the parent window or in any other object interested in this window. .. seealso:: :ref:`Events and Event Handling `, :ref:`WindowCreateEvent` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **WindowDestroyEvent** .. raw:: html

Inheritance diagram of WindowDestroyEvent

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~WindowDestroyEvent.__init__` Constructor. :meth:`~WindowDestroyEvent.GetWindow` Return the window being destroyed. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~WindowDestroyEvent.Window` See :meth:`~WindowDestroyEvent.GetWindow` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: WindowDestroyEvent(CommandEvent) This event is sent as early as possible during the window destruction process. **Possible constructors**:: WindowDestroyEvent(win=None) .. method:: __init__(self, win=None) Constructor. :param `win`: :type `win`: Window .. method:: GetWindow(self) Return the window being destroyed. :rtype: :ref:`Window` .. attribute:: Window See :meth:`~WindowDestroyEvent.GetWindow`