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:
@@ -1236,7 +1236,8 @@ void WidgetsFrame::OnWidgetFocus(wxFocusEvent& event)
|
|||||||
// only log these events in our own logger.
|
// only log these events in our own logger.
|
||||||
if ( wxGetApp().IsUsingLogWindow() )
|
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");
|
event.GetEventType() == wxEVT_SET_FOCUS ? "got" : "lost");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user