]> git.saurik.com Git - wxWidgets.git/commitdiff
Test EVT_TREE_ITEM_ACTIVATED
authorRobin Dunn <robin@alldunn.com>
Thu, 12 Apr 2007 00:35:36 +0000 (00:35 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 12 Apr 2007 00:35:36 +0000 (00:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45412 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/TreeListCtrl.py

index c5371334a288bf3047cd00bd5a716145b20bd609..65013924377a0b98d8aa4aa331288d0d7f9ca09a 100644 (file)
@@ -75,8 +75,13 @@ class TestPanel(wx.Panel):
         self.tree.Expand(self.root)
 
         self.tree.GetMainWindow().Bind(wx.EVT_RIGHT_UP, self.OnRightUp)
+        self.tree.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnActivate)
 
 
+    def OnActivate(self, evt):
+        self.log.write('OnActivate: %s' % self.tree.GetItemText(evt.GetItem()))
+        
+
     def OnRightUp(self, evt):
         pos = evt.GetPosition()
         item, flags, col = self.tree.HitTest(pos)