Improve wxMenu::Break() documentation and show it in the sample

Document that this method only actually does something in wxMSW.

Demonstrate the use of it in the menu sample.

See #18692.
This commit is contained in:
Vadim Zeitlin
2020-04-18 00:43:09 +02:00
parent d6906719f4
commit efa302c577
2 changed files with 11 additions and 0 deletions

View File

@@ -592,7 +592,15 @@ MyFrame::MyFrame()
"Enable or disable the last menu item", true);
menuMenu->Append(Menu_Menu_Check, "&Check menu item\tAlt-C",
"Check or uncheck the last menu item", true);
// Show the effect of Break(). As wxMSW is the only port in which calling
// it actually does something, insert a separator under the other platforms.
#ifdef __WXMSW__
menuMenu->Break();
#else
menuMenu->AppendSeparator();
#endif
menuMenu->Append(Menu_Menu_GetInfo, "Get menu item in&fo\tAlt-F",
"Show the state of the last menu item");
#if wxUSE_TEXTDLG