From: Sylvain Bougnoux Date: Fri, 16 Jul 1999 08:19:02 +0000 (+0000) Subject: flag use of multiple selection for MSW X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/622d090e8ae11b240cbe17568a6047e3888c5a52?ds=inline flag use of multiple selection for MSW git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp index 9aeb981421..04c4682fcf 100644 --- a/samples/treectrl/treetest.cpp +++ b/samples/treectrl/treetest.cpp @@ -35,7 +35,11 @@ #include "treetest.h" +#ifdef wxTR_HAS_VARIABLE_ROW_HIGHT #define USE_TR_HAS_VARIABLE_ROW_HIGHT 1 +#else +#define USE_TR_HAS_VARIABLE_ROW_HIGHT 0 +#endif // under Windows the icons are in the .rc file #ifndef __WXMSW__ @@ -155,7 +159,9 @@ MyFrame::MyFrame(const wxString& title, int x, int y, int w, int h) item_menu->AppendSeparator(); item_menu->Append(TreeTest_Dump, "&Dump item children"); +#ifdef wxTR_MULTIPLE item_menu->Append(TreeTest_Dump_Selected, "Dump selected items\tAlt-S"); +#endif item_menu->Append(TreeTest_Rename, "&Rename item..."); item_menu->AppendSeparator(); @@ -171,7 +177,9 @@ MyFrame::MyFrame(const wxString& title, int x, int y, int w, int h) m_treeCtrl = new MyTreeCtrl(this, TreeTest_Ctrl, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS | +#ifdef wxTR_MULTIPLE wxTR_MULTIPLE | +#endif #if USE_TR_HAS_VARIABLE_ROW_HIGHT wxTR_HAS_VARIABLE_ROW_HIGHT | #endif @@ -264,7 +272,8 @@ void MyFrame::OnDump(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnDumpSelected(wxCommandEvent& WXUNUSED(event)) { - wxArrayTreeItemIds array; +#ifdef wxTR_MULTIPLE + wxArrayTreeItemIds array; m_treeCtrl->GetSelections(array); size_t nos=array.Count(); @@ -272,6 +281,7 @@ void MyFrame::OnDumpSelected(wxCommandEvent& WXUNUSED(event)) for (size_t n=0; nGetItemText(array.Item(n))); +#endif } void MyFrame::DoSetBold(bool bold)