Show window enter/leave events in the widgets sample
This allows to easily check if these events are generated correctly for all the controls shown in this sample.
This commit is contained in:
parent
f24b3d5483
commit
b93422535d
1 changed files with 11 additions and 0 deletions
|
|
@ -741,6 +741,17 @@ void WidgetsFrame::ConnectToWidgetEvents()
|
|||
w->Bind(wxEVT_SET_FOCUS, &WidgetsFrame::OnWidgetFocus, this);
|
||||
w->Bind(wxEVT_KILL_FOCUS, &WidgetsFrame::OnWidgetFocus, this);
|
||||
|
||||
w->Bind(wxEVT_ENTER_WINDOW, [w](wxMouseEvent& event)
|
||||
{
|
||||
wxLogMessage("Mouse entered into '%s'", w->GetClassInfo()->GetClassName());
|
||||
event.Skip();
|
||||
});
|
||||
w->Bind(wxEVT_LEAVE_WINDOW, [w](wxMouseEvent& event)
|
||||
{
|
||||
wxLogMessage("Mouse left '%s'", w->GetClassInfo()->GetClassName());
|
||||
event.Skip();
|
||||
});
|
||||
|
||||
w->Bind(wxEVT_CONTEXT_MENU, &WidgetsFrame::OnWidgetContextMenu, this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue