Changeset 3187
- Timestamp:
- 06/20/07 10:34:24 (2 years ago)
- Files:
-
- trunk/dabo/dEvents.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dGrid.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/dEvents.py
r3100 r3187 710 710 711 711 712 class GridCellEditorHit(GridEvent): 713 """Occurs when the user changes the value in the grid cell editor. 714 715 For a checkbox, this occurs when the user toggles the checkmark. 716 This event is not implemented for other grid cell editors, yet. 717 """ 718 719 712 720 class GridColSize(GridEvent): 713 721 """Occurs when the grid's columns are resized.""" trunk/dabo/ui/uiwx/dGrid.py
r3184 r3187 3300 3300 if ed: 3301 3301 ed.SetValue(not ed.GetValue()) 3302 3302 self._checkBoxToggled(ed) 3303 3304 def _checkBoxToggled(self, obj): 3305 # Force the flushing of the value immediately, instead of waiting for the 3306 # editor to lose focus (where the flush will happen a second time). 3307 self._Table.SetValue(self.CurrentRow, self.CurrentColumn, obj.GetValue()) 3308 self.raiseEvent(dabo.dEvents.GridCellEditorHit) 3309 3303 3310 def __onGridCellLeftClick_toggleCB(self, evt): 3304 3311 col = self.Columns[evt.GetCol()] … … 3334 3341 evt.Skip() 3335 3342 3343 def onHit(evt): 3344 self._checkBoxToggled(editor) 3345 3336 3346 ed = self._activeEditorControl = evt.Control 3337 3347 ed.WindowStyle |= wx.WANTS_CHARS 3338 3348 ed.Bind(wx.EVT_KEY_DOWN, onKeyDown) 3349 ed.Bind(wx.EVT_CHECKBOX, onHit) 3339 3350 evt.Skip() 3340 3351
