]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/lib/mixins/grid.py
1 #----------------------------------------------------------------------------
2 # Name: wxPython.lib.mixins.grid
3 # Purpose: Helpful mix-in classes for wx.Grid
9 # Copyright: (c) 2001 by Total Control Software
10 # Licence: wxWindows license
11 #----------------------------------------------------------------------------
12 # 12/14/2003 - Jeff Grimmett (grimmtooth@softhome.net)
14 # o 2.5 compatability update.
17 # 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
19 # o wxGridAutoEditMixin -> GridAutoEditMixin
25 #----------------------------------------------------------------------------
28 class GridAutoEditMixin
:
29 """A mix-in class that automatically enables the grid edit control when
32 If your class hooks EVT_GRID_SELECT_CELL be sure to call event.Skip so
33 this handler will be called too.
38 self
.Bind(wx
.EVT_IDLE
, self
.__OnIdle
)
39 self
.Bind(wx
.grid
.EVT_GRID_SELECT_CELL
, self
.__OnSelectCell
)
42 def __OnIdle(self
, evt
):
44 if self
.CanEnableCellControl():
45 self
.EnableCellEditControl()
50 def __OnSelectCell(self
, evt
):