]>
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 #----------------------------------------------------------------------------
13 from wxPython
import wx
, grid
15 #----------------------------------------------------------------------------
18 class wxGridAutoEditMixin
:
19 """A mix-in class that automatically enables the grid edit control when
22 If your class hooks EVT_GRID_SELECT_CELL be sure to call event.Skip so
23 this handler will be called too.
28 wx
.EVT_IDLE(self
, self
.__OnIdle
)
29 grid
.EVT_GRID_SELECT_CELL(self
, self
.__OnSelectCell
)
32 def __OnIdle(self
, evt
):
34 if self
.CanEnableCellControl():
35 self
.EnableCellEditControl()
40 def __OnSelectCell(self
, evt
):