phoenix_title wx.lib.sheet.CCellEditor

Custom cell editor


class_hierarchy Class Hierarchy

Inheritance diagram for class CCellEditor:

super_classes Known Superclasses

wx.core.deprecated.<locals.DeprecatedClassProxy


method_summary Methods Summary

__init__

Initialize self. See help(type(self)) for accurate signature.

BeginEdit

Fetch the value from the table and prepare edit control to begin editing.

Clone

Create a new object which is the copy of this one. Must Override.

Create

Create the actual edit control. Must derive from wxControl.

Destroy

Final cleanup

EndEdit

Commit editing the current cell. Returns True if the value has changed.

IsAcceptedKey

Return True to allow the given key to start editing. The base class

PaintBackground

Draws the part of the cell not occupied by the edit control. The

Reset

Reset the value in the control back to its starting value. Must Override.

SetSize

Position/size the edit control within the cell rectangle.

Show

Show or hide the edit control. Use the attr (if not None)

StartingClick

If the editor is enabled by clicking on the cell, this method will be

StartingKey

If the editor is enabled by pressing keys on the grid, this will be


api 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 True if the value has changed. If necessary, the control may be destroyed. Must Override.



IsAcceptedKey(self, evt)

Return True to 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.