+1  A: 

Okay, first off, here is the code to put in your BasicPanel class:

void OnKillFocus(wxFocusEvent& event);

Then add the following to the end of your BasicPanel constructor:

Connect(ID_TEXTCTRL,
        wxEVT_KILL_FOCUS ,
        (wxObjectEventFunction)&BasicPanel::OnKillFocus);

You will need to repeat the above code for each text control and replace ID_TEXTCTRL with the actual ID of the controls.

Then the code below will get called whenever one of the controls loses focus.

void BasicPanel::OnKillFocus(wxFocusEvent& event)
{
    // code goes here...
}

To determine the ID of the control that generated the event within OnKillFocus, you can use the following:

event.GetId()
George Edison
After adding the suggested changes... nothing happens any different.
Wallter
Hmmm... let me try the code and see if I can figure it out....
George Edison
@Walter: Okay, I figured it out: you need to call `Connect` on the *text control*. So the 'Connect' line above would be changed to `TextCtrl->Connect(....);` where TextCtrl is the pointer to the text control.
George Edison