// 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
#if USE_LOG_WINDOW
wxMenuItem *item = new wxMenuItem(fileMenu, Menu_File_ClearLog,
_T("Clear &log\tCtrl-L"));
#if USE_LOG_WINDOW
wxMenuItem *item = new wxMenuItem(fileMenu, Menu_File_ClearLog,
_T("Clear &log\tCtrl-L"));
wxMenu* subMenu = new wxMenu;
subMenu->Append(Menu_SubMenu_Normal, _T("&Normal submenu item"), _T("Disabled submenu item"));
wxMenu* subMenu = new wxMenu;
subMenu->Append(Menu_SubMenu_Normal, _T("&Normal submenu item"), _T("Disabled submenu item"));
- subMenu->AppendCheckItem(Menu_SubMenu_Check, _T("&Unchecked submenu item"), _T("Unchecked submenu item"));
+ subMenu->AppendCheckItem(Menu_SubMenu_Check, _T("&Check submenu item"), _T("Check submenu item"));
subMenu->AppendRadioItem(Menu_SubMenu_Radio1, _T("Radio item &1"), _T("Radio item"));
subMenu->AppendRadioItem(Menu_SubMenu_Radio2, _T("Radio item &2"), _T("Radio item"));
subMenu->AppendRadioItem(Menu_SubMenu_Radio3, _T("Radio item &3"), _T("Radio item"));
subMenu->AppendRadioItem(Menu_SubMenu_Radio1, _T("Radio item &1"), _T("Radio item"));
subMenu->AppendRadioItem(Menu_SubMenu_Radio2, _T("Radio item &2"), _T("Radio item"));
subMenu->AppendRadioItem(Menu_SubMenu_Radio3, _T("Radio item &3"), _T("Radio item"));
menuMenu->AppendSeparator();
menuMenu->Append(Menu_Menu_GetInfo, _T("Get menu item in&fo\tAlt-F"),
_T("Show the state of the last menu item"));
menuMenu->AppendSeparator();
menuMenu->Append(Menu_Menu_GetInfo, _T("Get menu item in&fo\tAlt-F"),
_T("Show the state of the last menu item"));
#if wxUSE_TEXTDLG
menuMenu->AppendSeparator();
menuMenu->Append(Menu_Menu_FindItem, _T("Find menu item from label"),
#if wxUSE_TEXTDLG
menuMenu->AppendSeparator();
menuMenu->Append(Menu_Menu_FindItem, _T("Find menu item from label"),
- m_textctrl = new wxTextCtrl(this, wxID_ANY, _T(""),
+ m_textctrl = new wxTextCtrl(this, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE);
m_textctrl->SetEditable(false);
wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE);
m_textctrl->SetEditable(false);
- if ( GetMenuBar()->FindItem(id)->IsCheckable() )
+
+ // catch all checkable menubar items and also the check item from the popup
+ // menu
+ wxMenuItem *item = GetMenuBar()->FindItem(id);
+ if ( (item && item->IsCheckable()) || id == Menu_Popup_ToBeChecked )
{
msg += wxString::Format(_T(" (the item is currently %schecked)"),
event.IsChecked() ? _T("") : _T("not "));
{
msg += wxString::Format(_T(" (the item is currently %schecked)"),
event.IsChecked() ? _T("") : _T("not "));
menu->Insert(0, wxMenuItem::New(menu, Menu_Dummy_Fourth,
_T("Fourth dummy item\tCtrl-F4")));
menu->Insert(0, wxMenuItem::New(menu, Menu_Dummy_Fourth,
_T("Fourth dummy item\tCtrl-F4")));
- menu->Insert(1, wxMenuItem::New(menu, wxID_SEPARATOR, _T("")));
+ menu->Insert(1, wxMenuItem::New(menu, wxID_SEPARATOR));
menu.Append(Menu_Help_About, _T("&About"));
menu.Append(Menu_Popup_Submenu, _T("&Submenu"), CreateDummyMenu(NULL));
menu.Append(Menu_Help_About, _T("&About"));
menu.Append(Menu_Popup_Submenu, _T("&Submenu"), CreateDummyMenu(NULL));