]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/CustomTreeCtrl.py
Undid last commit and restored bool argument to wxFrame::DoGiveHelp() as
[wxWidgets.git] / wxPython / demo / CustomTreeCtrl.py
index 805a4385e3dbdf0d83a3971285b222a3ee83a576..d9faaaee0f640c8f57ac27904c1b7d45bef53017 100644 (file)
@@ -764,7 +764,8 @@ class CustomTreeCtrlDemo(wx.Panel):
         splitter = wx.SplitterWindow(self, -1, style=wx.CLIP_CHILDREN | wx.SP_LIVE_UPDATE | wx.SP_3D)
 
         # Create the CustomTreeCtrl, using a derived class defined below
-        self.tree = CustomTreeCtrl(splitter, -1, log=self.log, style=wx.SUNKEN_BORDER)           
+        self.tree = CustomTreeCtrl(splitter, -1, log=self.log, 
+                                   style= wx.SUNKEN_BORDER| CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT)           
 
         self.leftpanel = wx.ScrolledWindow(splitter, -1, style=wx.SUNKEN_BORDER)
         self.leftpanel.SetScrollRate(20,20)
@@ -1239,11 +1240,10 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
 
     def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,
                  size=wx.DefaultSize,
-                 style=wx.SUNKEN_BORDER,
-                 ctstyle=CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT,
+                 style=wx.SUNKEN_BORDER | CT.TR_HAS_BUTTONS | CT.TR_HAS_VARIABLE_ROW_HEIGHT,
                  log=None):
 
-        CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style, ctstyle)
+        CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style)
 
         alldata = dir(CT)
 
@@ -1333,7 +1333,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
         self.Bind(wx.EVT_LEFT_DCLICK, self.OnLeftDClick)
         self.Bind(wx.EVT_IDLE, self.OnIdle)
 
-
         self.eventdict = {'EVT_TREE_BEGIN_DRAG': self.OnBeginDrag, 'EVT_TREE_BEGIN_LABEL_EDIT': self.OnBeginEdit,
                           'EVT_TREE_BEGIN_RDRAG': self.OnBeginRDrag, 'EVT_TREE_DELETE_ITEM': self.OnDeleteItem,
                           'EVT_TREE_END_DRAG': self.OnEndDrag, 'EVT_TREE_END_LABEL_EDIT': self.OnEndEdit,
@@ -1544,7 +1543,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
         
         self.PopupMenu(menu)
         menu.Destroy()
-        event.Skip()
         
 
     def OnItemBackground(self, event):
@@ -1560,7 +1558,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             col1 = data.GetColour().Get()
             self.SetItemBackgroundColour(self.current, col1)
         dlg.Destroy()
-        event.Skip()
 
 
     def OnItemForeground(self, event):
@@ -1576,13 +1573,11 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             col1 = data.GetColour().Get()
             self.SetItemTextColour(self.current, col1)
         dlg.Destroy()
-        event.Skip()
 
 
     def OnItemBold(self, event):
 
         self.SetItemBold(self.current, not self.itemdict["isbold"])
-        event.Skip()
 
 
     def OnItemFont(self, event):
@@ -1603,13 +1598,11 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             self.SetItemFont(self.current, font)
 
         dlg.Destroy()
-        event.Skip()
         
 
     def OnItemHyperText(self, event):
 
         self.SetItemHyperText(self.current, not self.itemdict["ishtml"])
-        event.Skip()
 
 
     def OnEnableWindow(self, event):
@@ -1617,13 +1610,10 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
         enable = self.GetItemWindowEnabled(self.current)
         self.SetItemWindowEnabled(self.current, not enable)
 
-        event.Skip()
-
 
     def OnDisableItem(self, event):
 
         self.EnableItem(self.current, False)
-        event.Skip()
         
 
     def OnItemIcons(self, event):
@@ -1635,7 +1625,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
         dlg = TreeIcons(self, -1, bitmaps=bitmaps)
         wx.EndBusyCursor()
         dlg.ShowModal()
-        event.Skip()
 
 
     def SetNewIcons(self, bitmaps):
@@ -1669,7 +1658,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
         dlg.ShowModal()
         dlg.Destroy()
                 
-        event.Skip()
         
 
     def OnItemDelete(self, event):
@@ -1687,7 +1675,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
         self.Delete(self.current)
         self.current = None
         
-        event.Skip()        
 
 
     def OnItemPrepend(self, event):
@@ -1700,7 +1687,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             self.EnsureVisible(newitem)
 
         dlg.Destroy()
-        event.Skip()
 
 
     def OnItemAppend(self, event):
@@ -1713,7 +1699,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             self.EnsureVisible(newitem)
 
         dlg.Destroy()
-        event.Skip()
         
 
     def OnBeginEdit(self, event):
@@ -1831,7 +1816,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             self.log.write("Beginning Drag..." + "\n")
 
             event.Allow()
-            event.Skip()
 
 
     def OnBeginRDrag(self, event):
@@ -1841,7 +1825,6 @@ class CustomTreeCtrl(CT.CustomTreeCtrl):
             self.log.write("Beginning Right Drag..." + "\n")
 
             event.Allow()
-            event.Skip()
         
 
     def OnEndDrag(self, event):