From: Vadim Zeitlin Date: Wed, 4 Jul 2001 16:17:14 +0000 (+0000) Subject: testing tree ctrl with wxUniv X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/801bb685b09b4173dcf9a0c52c6a8e50e3fdd842?hp=b9cc8004c056b5911d0a05dbfa4a323eb765d281 testing tree ctrl with wxUniv git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/treectrl/treectrl.cpp b/samples/treectrl/treectrl.cpp index 9fc8b16228..749bc0d3c9 100644 --- a/samples/treectrl/treectrl.cpp +++ b/samples/treectrl/treectrl.cpp @@ -155,6 +155,7 @@ MyFrame::MyFrame(const wxString& title, int x, int y, int w, int h) // Give it an icon SetIcon(wxICON(mondrian)); +#if wxUSE_MENUS // Make a menubar wxMenu *file_menu = new wxMenu, *tree_menu = new wxMenu, @@ -215,6 +216,7 @@ MyFrame::MyFrame(const wxString& title, int x, int y, int w, int h) SetMenuBar(menu_bar); menu_bar->Check(TreeTest_ToggleImages, TRUE); +#endif // wxUSE_MENUS m_treeCtrl = new MyTreeCtrl(this, TreeTest_Ctrl, wxDefaultPosition, wxDefaultSize, @@ -867,11 +869,13 @@ void MyTreeCtrl::ShowMenu(wxTreeItemId id, const wxPoint& pt) title = _T("Menu for no particular item"); } +#if wxUSE_MENUS wxMenu menu(title); menu.Append(TreeTest_About, _T("&About...")); menu.Append(TreeTest_Dump, _T("&Dump")); PopupMenu(&menu, pt); +#endif // wxUSE_MENUS } void MyTreeCtrl::OnRMouseDClick(wxMouseEvent& event)