// not all ports have support for EVT_CONTEXT_MENU yet, don't define
// USE_CONTEXT_MENU for those which don't
// not all ports have support for EVT_CONTEXT_MENU yet, don't define
// USE_CONTEXT_MENU for those which don't
-// this sample is usefull when new port is developed
-// and usually new port has majority of flags turned off
+// this sample is useful when a new port is developed
+// and usually a new port has majority of flags turned off
#if USE_LOG_WINDOW
wxMenuItem *item = new wxMenuItem(fileMenu, Menu_File_ClearLog,
wxT("Clear &log\tCtrl-L"));
#if USE_LOG_WINDOW
wxMenuItem *item = new wxMenuItem(fileMenu, Menu_File_ClearLog,
wxT("Clear &log\tCtrl-L"));
wxMenu *menuMenu = new wxMenu;
menuMenu->Append(Menu_Menu_Append, wxT("&Append menu item\tAlt-A"),
wxMenu *menuMenu = new wxMenu;
menuMenu->Append(Menu_Menu_Append, wxT("&Append menu item\tAlt-A"),
menuMenu->AppendSeparator();
menuMenu->Append(Menu_Menu_Enable, wxT("&Enable menu item\tAlt-E"),
wxT("Enable or disable the last menu item"), true);
menuMenu->AppendSeparator();
menuMenu->Append(Menu_Menu_Enable, wxT("&Enable menu item\tAlt-E"),
wxT("Enable or disable the last menu item"), true);
m_logOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_textctrl));
wxLogMessage(wxT("Brief explanations: the commands in the \"Menu\" menu ")
m_logOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_textctrl));
wxLogMessage(wxT("Brief explanations: the commands in the \"Menu\" menu ")
wxT("The commands in the \"Menubar\" menu work with the ")
wxT("menubar itself.\n\n")
wxT("Right click the band below to test popup menus.\n"));
wxT("The commands in the \"Menubar\" menu work with the ")
wxT("menubar itself.\n\n")
wxT("Right click the band below to test popup menus.\n"));
- GetMenuBar()->Insert(0, menu, title);
+ // Insert before the 'Help' menu
+ // Otherwise repeated Deletes will remove the 'Test' menu
+ GetMenuBar()->Insert(4, menu, title);
menu->Append(Menu_Dummy_Last, wxT("&Dummy sub menu"),
CreateDummyMenu(NULL), wxT("Dummy sub menu help"));
menu->Append(Menu_Dummy_Last, wxT("&Dummy sub menu"),
CreateDummyMenu(NULL), wxT("Dummy sub menu help"));
menu->Insert(0, wxMenuItem::New(menu, Menu_Dummy_Fourth,
wxT("Fourth dummy item\tCtrl-F4")));
menu->Insert(0, wxMenuItem::New(menu, Menu_Dummy_Fourth,
wxT("Fourth dummy item\tCtrl-F4")));