]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/treectrl/treectrl.cpp
Bug fix
[wxWidgets.git] / samples / treectrl / treectrl.cpp
index 0ae0d46847d7e69f7a2b159f34951010126aa310..e04b74f31442af5cf4c64b19aff9d451bd2fc63b 100644 (file)
@@ -98,7 +98,11 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
     EVT_MENU(TreeTest_ToggleIcon, MyFrame::OnToggleIcon)
 END_EVENT_TABLE()
 
+#if USE_GENERIC_TREECTRL
+BEGIN_EVENT_TABLE(MyTreeCtrl, wxGenericTreeCtrl)
+#else
 BEGIN_EVENT_TABLE(MyTreeCtrl, wxTreeCtrl)
+#endif
     EVT_TREE_BEGIN_DRAG(TreeTest_Ctrl, MyTreeCtrl::OnBeginDrag)
     EVT_TREE_BEGIN_RDRAG(TreeTest_Ctrl, MyTreeCtrl::OnBeginRDrag)
     EVT_TREE_END_DRAG(TreeTest_Ctrl, MyTreeCtrl::OnEndDrag)
@@ -211,7 +215,7 @@ 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 |
+                                wxTR_HAS_BUTTONS | // wxTR_NO_LINES |
                                 wxTR_EDIT_LABELS |
 #ifndef NO_VARIABLE_HEIGHT
                                 wxTR_HAS_VARIABLE_ROW_HEIGHT |
@@ -513,7 +517,11 @@ void MyFrame::OnToggleIcon(wxCommandEvent& WXUNUSED(event))
 }
 
 // MyTreeCtrl implementation
+#if USE_GENERIC_TREECTRL
+IMPLEMENT_DYNAMIC_CLASS(MyTreeCtrl, wxGenericTreeCtrl)
+#else
 IMPLEMENT_DYNAMIC_CLASS(MyTreeCtrl, wxTreeCtrl)
+#endif
 
 MyTreeCtrl::MyTreeCtrl(wxWindow *parent, const wxWindowID id,
                        const wxPoint& pos, const wxSize& size,