Log widget class name for focus events in widgets sample
This shows better what is going on with focus and makes troubleshooting easier.
This commit is contained in:
parent
669e97c016
commit
b97bf311e0
@ -1236,7 +1236,8 @@ void WidgetsFrame::OnWidgetFocus(wxFocusEvent& event)
|
||||
// only log these events in our own logger.
|
||||
if ( wxGetApp().IsUsingLogWindow() )
|
||||
{
|
||||
wxLogMessage("Widgets %s focus",
|
||||
wxWindow* win = (wxWindow*)event.GetEventObject();
|
||||
wxLogMessage("Widget '%s' %s focus", win->GetClassInfo()->GetClassName(),
|
||||
event.GetEventType() == wxEVT_SET_FOCUS ? "got" : "lost");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user