Update menu event documentation and sample
Update the documentation to reflect change to the GetMenu event working for all 3 menu events. Also update the sample to give the menu for the highlight event.
This commit is contained in:
@@ -1235,19 +1235,21 @@ void MyFrame::LogMenuOpenCloseOrHighlight(const wxMenuEvent& event, const wxStri
|
||||
|
||||
if ( event.GetEventType() == wxEVT_MENU_HIGHLIGHT )
|
||||
{
|
||||
msg << " (id=" << event.GetId() << ")";
|
||||
msg << " (id=" << event.GetId() << " in ";
|
||||
}
|
||||
else // wxEVT_MENU_{OPEN,CLOSE}
|
||||
else
|
||||
{
|
||||
wxMenu* const menu = event.GetMenu();
|
||||
if ( menu )
|
||||
{
|
||||
msg << " (menu with title \"" << menu->GetTitle() << "\")";
|
||||
}
|
||||
else
|
||||
{
|
||||
msg << " (no menu)";
|
||||
}
|
||||
msg << " (";
|
||||
}
|
||||
|
||||
wxMenu* const menu = event.GetMenu();
|
||||
if ( menu )
|
||||
{
|
||||
msg << "menu with title \"" << menu->GetTitle() << "\")";
|
||||
}
|
||||
else
|
||||
{
|
||||
msg << "no menu provided)";
|
||||
}
|
||||
|
||||
msg << ".";
|
||||
|
Reference in New Issue
Block a user