]>
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 wxGrid
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.
21 #----------------------------------------------------------------------------
24 class wxGridAutoEditMixin
:
25 """A mix-in class that automatically enables the grid edit control when
28 If your class hooks EVT_GRID_SELECT_CELL be sure to call event.Skip so
29 this handler will be called too.
34 self
.Bind(wx
.EVT_IDLE
, self
.__OnIdle
)
35 self
.Bind(wx
.grid
.EVT_GRID_SELECT_CELL
, self
.__OnSelectCell
)
38 def __OnIdle(self
, evt
):
40 if self
.CanEnableCellControl():
41 self
.EnableCellEditControl()
46 def __OnSelectCell(self
, evt
):