]> git.saurik.com Git - wxWidgets.git/commitdiff
fix compilation with WXWIN_COMPATIBILITY_2_6 off (and probably a bug)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 10 Feb 2007 13:48:45 +0000 (13:48 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 10 Feb 2007 13:48:45 +0000 (13:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/regtest/regtest.cpp

index a7dc10acebe10c4869a345a6a616ea7e4bca59dd..ec9b9799884e7a4eca2a1ccfc3b32b62677c7796 100644 (file)
@@ -259,9 +259,10 @@ END_EVENT_TABLE()
 #if DO_REGTEST
 
 BEGIN_EVENT_TABLE(RegTreeCtrl, wxTreeCtrl)
-    EVT_TREE_DELETE_ITEM   (Ctrl_RegTree, RegTreeCtrl::OnDeleteItem)
-    EVT_TREE_ITEM_EXPANDING(Ctrl_RegTree, RegTreeCtrl::OnItemExpanding)
-    EVT_TREE_SEL_CHANGED   (Ctrl_RegTree, RegTreeCtrl::OnSelChanged)
+    EVT_TREE_DELETE_ITEM    (Ctrl_RegTree, RegTreeCtrl::OnDeleteItem)
+    EVT_TREE_ITEM_EXPANDING (Ctrl_RegTree, RegTreeCtrl::OnItemExpanding)
+    EVT_TREE_ITEM_COLLAPSING(Ctrl_RegTree, RegTreeCtrl::OnItemExpanding)
+    EVT_TREE_SEL_CHANGED    (Ctrl_RegTree, RegTreeCtrl::OnSelChanged)
 
     EVT_TREE_BEGIN_LABEL_EDIT(Ctrl_RegTree, RegTreeCtrl::OnBeginEdit)
     EVT_TREE_END_LABEL_EDIT  (Ctrl_RegTree, RegTreeCtrl::OnEndEdit)
@@ -713,7 +714,7 @@ void RegTreeCtrl::OnSelChanged(wxTreeEvent& event)
 void RegTreeCtrl::OnItemExpanding(wxTreeEvent& event)
 {
     TreeNode *pNode = GetNode(event);
-    bool bExpanding = event.GetKeyCode() == wxTREE_EXPAND_EXPAND;
+    bool bExpanding = event.GetEventType() == wxEVT_TREE_ITEM_EXPANDING;
 
     // expansion might take some time
     wxSetCursor(*wxHOURGLASS_CURSOR);