I have this window :
Let's consider the focus is set on the bottom right text control (right to AAEGTX).
The next widget to be focused, when pressing the down arrow for example, is the button "Corriger".
The documentation says, about the GetWindow function of the kill focus event :
That is, I try to get the following window (my button) during the kill focus event of my text control.wxFocusEvent::GetWindow
Returns the window associated with this event, that is the window which had the focus before for the wxEVT_SET_FOCUS event and the window which is going to receive focus for the wxEVT_KILL_FOCUS one.
Warning: the window pointer may be NULL!
When I do :
Code: Select all
void
CTrainingGameWordControl::OnLeaveFocus( wxFocusEvent& event )
{
// When leaving the focus, set the new focus on the following element of the widget list
// If the window this is about to receive the focus is a button, set the focus on the following text control
wxWindow* loc_po_window = event.GetWindow() ;
Is this normal, or there is a problem with this function ?
Thanks for your help.
Bye.