]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/mixins/grid.py
Tweaks to work around wxMac bugs
[wxWidgets.git] / wxPython / wx / lib / mixins / grid.py
index b6040111b799d57a3eb7c84f021b6f0978be3f4b..f24b65058f62e9a92415bdf7a01c0b9ad3e3eb99 100644 (file)
@@ -1,6 +1,6 @@
 #----------------------------------------------------------------------------
 # Name:        wxPython.lib.mixins.grid
-# Purpose:     Helpful mix-in classes for wxGrid
+# Purpose:     Helpful mix-in classes for wx.Grid
 #
 # Author:      Robin Dunn
 #
@@ -9,13 +9,23 @@
 # Copyright:   (c) 2001 by Total Control Software
 # Licence:     wxWindows license
 #----------------------------------------------------------------------------
+# 12/14/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o 2.5 compatability update.
+# o Untested
+#
+# 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxGridAutoEditMixin -> GridAutoEditMixin
+#
 
-from wxPython import wx, grid
+import  wx
+import  wx.grid
 
 #----------------------------------------------------------------------------
 
 
-class wxGridAutoEditMixin:
+class GridAutoEditMixin:
     """A mix-in class that automatically enables the grid edit control when
     a cell is selected.
 
@@ -25,8 +35,8 @@ class wxGridAutoEditMixin:
 
     def __init__(self):
         self.__enableEdit = 0
-        wx.EVT_IDLE(self, self.__OnIdle)
-        grid.EVT_GRID_SELECT_CELL(self, self.__OnSelectCell)
+        self.Bind(wx.EVT_IDLE, self.__OnIdle)
+        self.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.__OnSelectCell)
 
 
     def __OnIdle(self, evt):