wx.lib.sheet.CCellEditor¶
Custom cell editor
Class Hierarchy¶
Known Superclasses¶
wx.core.deprecated.<locals.DeprecatedClassProxy
Methods Summary¶
Initialize self. See help(type(self)) for accurate signature. |
|
Fetch the value from the table and prepare edit control to begin editing. |
|
Create a new object which is the copy of this one. Must Override. |
|
Create the actual edit control. Must derive from wxControl. |
|
Final cleanup |
|
Commit editing the current cell. Returns |
|
Return |
|
Draws the part of the cell not occupied by the edit control. The |
|
Reset the value in the control back to its starting value. Must Override. |
|
Position/size the edit control within the cell rectangle. |
|
Show or hide the edit control. Use the attr (if not None) |
|
If the editor is enabled by clicking on the cell, this method will be |
|
If the editor is enabled by pressing keys on the grid, this will be |
Class API¶
- class CCellEditor(wx.grid.PyGridCellEditor)¶
Custom cell editor
Methods¶
- __init__(self, grid)¶
Initialize self. See help(type(self)) for accurate signature.
- BeginEdit(self, row, col, grid)¶
Fetch the value from the table and prepare edit control to begin editing. Set the focus to the edit control. Must Override.
- Clone(self)¶
Create a new object which is the copy of this one. Must Override.
- Create(self, parent, id, evtHandler)¶
Create the actual edit control. Must derive from wxControl. Must Override
- Destroy(self)¶
Final cleanup
NOTE: There is no need to everride this if you don’t need to do something out of the ordinary.
- EndEdit(self, row, col, grid)¶
Commit editing the current cell. Returns
Trueif the value has changed. If necessary, the control may be destroyed. Must Override.
- IsAcceptedKey(self, evt)¶
Return
Trueto allow the given key to start editing. The base class version only checks that the event has no modifiers. F2 is special and will always start the editor.
- PaintBackground(self, rect, attr)¶
Draws the part of the cell not occupied by the edit control. The base class version just fills it with background colour from the attribute.
NOTE: There is no need to everride this if you don’t need to do something out of the ordinary.
- Reset(self)¶
Reset the value in the control back to its starting value. Must Override.
- SetSize(self, rect)¶
Position/size the edit control within the cell rectangle.
- Show(self, show, attr)¶
Show or hide the edit control. Use the attr (if not None) to set colors or fonts for the control.
NOTE: There is no need to everride this if you don’t need to do something out of the ordinary.
- StartingClick(self)¶
If the editor is enabled by clicking on the cell, this method will be called to allow the editor to simulate the click on the control.
- StartingKey(self, evt)¶
If the editor is enabled by pressing keys on the grid, this will be called to let the editor react to that first key.