dabo Commit
Revision 3184
Date: 2007-06-19 15:25:49 -0700 (Tue, 19 Jun 2007)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/3184
Changed:
U trunk/dabo/ui/uiwx/dGrid.py
Log:
Added a hook method to dGrid: afterCellEdit(), which is called after the
user edits a cell value in the grid and the grid cell editor is hidden.
Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2007-06-19 16:03:37 UTC (rev 3183)
+++ trunk/dabo/ui/uiwx/dGrid.py 2007-06-19 22:25:49 UTC (rev 3184)
@@ -344,11 +344,11 @@
bizobj.setFieldVal(field, value)
else:
self.grid.DataSet[row][field] = value
+ self.grid.afterCellEdit(row, col)
-
class GridListEditor(wx.grid.GridCellChoiceEditor):
def __init__(self, *args, **kwargs):
dabo.infoLog.write("GridListEditor: Init ")
@@ -1694,8 +1694,8 @@
self.Bind(wx.grid.EVT_GRID_ROW_SIZE, self.__onWxGridRowSize)
self.Bind(wx.grid.EVT_GRID_SELECT_CELL,
self.__onWxGridSelectCell)
self.Bind(wx.grid.EVT_GRID_COL_SIZE, self.__onWxGridColSize)
+ self.Bind(wx.grid.EVT_GRID_EDITOR_CREATED,
self.__onWxGridEditorCreated)
self.Bind(wx.grid.EVT_GRID_EDITOR_SHOWN,
self.__onWxGridEditorShown)
- self.Bind(wx.grid.EVT_GRID_EDITOR_CREATED,
self.__onWxGridEditorCreated)
self.Bind(wx.grid.EVT_GRID_CELL_CHANGE,
self.__onWxGridCellChange)
self.Bind(wx.grid.EVT_GRID_RANGE_SELECT,
self.__onWxGridRangeSelect)
@@ -1839,6 +1839,11 @@
tbl.rowColorOdd = self._getWxColour(self.RowColorOdd)
tbl.rowColorEven = self._getWxColour(self.RowColorEven)
+
+ def afterCellEdit(self, row, col):
+ """Called after a cell has been edited by the user."""
+ pass
+
def fillGrid(self, force=False):
""" Refresh the grid to match the data in the data set."""
@@ -3331,7 +3336,6 @@
ed = self._activeEditorControl = evt.Control
ed.WindowStyle |= wx.WANTS_CHARS
ed.Bind(wx.EVT_KEY_DOWN, onKeyDown)
-
evt.Skip()
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]