.. include:: headings.inc .. _ChildFocusEvent: ========================================================================================================================================== |phoenix_title| **ChildFocusEvent** ========================================================================================================================================== A child focus event is sent to a (parent-)window when one of its child windows gains focus, so that the window could restore the focus back to its corresponding child if it loses it now and regains later. Notice that child window is the direct child of the window receiving event. Use :meth:`Window.FindFocus` to retrieve the window which is actually getting focus. .. _ChildFocusEvent-events: |events| Events Emitted by this Class ===================================== Handlers bound for the following event types will receive a :ref:`ChildFocusEvent` parameter. - EVT_CHILD_FOCUS: Process a ``wxEVT_CHILD_FOCUS`` event. .. seealso:: :ref:`Events and Event Handling ` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **ChildFocusEvent** .. raw:: html

Inheritance diagram of ChildFocusEvent

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~ChildFocusEvent.__init__` Constructor. :meth:`~ChildFocusEvent.GetWindow` Returns the direct child which receives the focus, or a (grand-)parent of the control receiving the focus. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~ChildFocusEvent.Window` See :meth:`~ChildFocusEvent.GetWindow` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: ChildFocusEvent(CommandEvent) A child focus event is sent to a (parent-)window when one of its child windows gains focus, so that the window could restore the focus back to its corresponding child if it loses it now and regains later. **Possible constructors**:: ChildFocusEvent(win=None) .. method:: __init__(self, win=None) Constructor. :param `win`: The direct child which is (or which contains the window which is) receiving the focus. :type `win`: Window .. method:: GetWindow(self) Returns the direct child which receives the focus, or a (grand-)parent of the control receiving the focus. To get the actually focused control use :meth:`Window.FindFocus` . :rtype: :ref:`Window` .. attribute:: Window See :meth:`~ChildFocusEvent.GetWindow`