Public Member Functions

# wxChildFocusEvent Class Reference
[Events]

`#include <wx/event.h>`

Inheritance diagram for wxChildFocusEvent:
[legend]

## Detailed Description

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 wxWindow::FindFocus() to retrieve the window which is actually getting focus.

## Events using this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxChildFocusEvent& event)

Event macros:

- EVT_CHILD_FOCUS(func):
  Process a `wxEVT_CHILD_FOCUS` event.

##

Library: wxCore
Category: Events

See also:
  Events and Event Handling

## Public Member Functions
| wxChildFocusEvent (wxWindow *win=NULL)
| Constructor.
wxWindow * | GetWindow () const
| Returns the direct child which receives the focus, or a (grand-)parent of the control receiving the focus.

List of all members.

## Constructor & Destructor Documentation

wxChildFocusEvent::wxChildFocusEvent | ( | wxWindow * | win = `NULL` | ) |

Constructor.

Parameters:

  | win | The direct child which is (or which contains the window which is) receiving the focus.

## Member Function Documentation

wxWindow* wxChildFocusEvent::GetWindow | ( |  | ) | const

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 wxWindow::FindFocus.

|  | [ top ]