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:
Artur Wieczorek 2019-10-24 20:43:45 +02:00
parent 669e97c016
commit b97bf311e0

View File

@ -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");
}