Log wxMenuEvent::GetMenu() in the menu sample for wxEVT_MENU_{OPEN,CLOSE}.
Show the menu associated with the event, if any, directly in the sample to make comparing the behaviour of the different ports easier. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1240,6 +1240,18 @@ void MyFrame::LogMenuOpenCloseOrHighlight(const wxMenuEvent& event, const wxChar
|
|||||||
{
|
{
|
||||||
msg << wxT(" (id=") << event.GetId() << wxT(")");
|
msg << wxT(" (id=") << event.GetId() << wxT(")");
|
||||||
}
|
}
|
||||||
|
else // wxEVT_MENU_{OPEN,CLOSE}
|
||||||
|
{
|
||||||
|
wxMenu* const menu = event.GetMenu();
|
||||||
|
if ( menu )
|
||||||
|
{
|
||||||
|
msg << " (menu with title \"" << menu->GetTitle() << "\")";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
msg << " (no menu)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
msg << wxT(".");
|
msg << wxT(".");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user