controls/CustomGrid.py
changeset 714 131ea7f237b9
parent 672 d751b1c609b3
--- a/controls/CustomGrid.py	Fri Jun 15 18:03:25 2012 +0200
+++ b/controls/CustomGrid.py	Mon Jun 25 20:03:53 2012 +0200
@@ -27,13 +27,6 @@
 
 class CustomGrid(wx.grid.Grid):
     
-    if wx.VERSION < (2, 6, 0):
-        def Bind(self, event, function, id = None):
-            if id is not None:
-                event(self, id, function)
-            else:
-                event(self, function)
-    
     def __init__(self, *args, **kwargs):
         wx.grid.Grid.__init__(self, *args, **kwargs)
         
@@ -50,11 +43,8 @@
         self.SetSelectionForeground(wx.BLACK)
         self.DisableDragRowSize()
         
-        if wx.VERSION >= (2, 6, 0):
-            self.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.OnSelectCell)
-            self.Bind(wx.grid.EVT_GRID_EDITOR_HIDDEN, self.OnEditorHidden)
-        else:
-            wx.grid.EVT_GRID_SELECT_CELL(self, self.OnSelectCell)
+        self.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.OnSelectCell)
+        self.Bind(wx.grid.EVT_GRID_EDITOR_HIDDEN, self.OnEditorHidden)
         self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)
     
     def SetDefaultValue(self, default_value):