wx.grid.GridCellTextEditor¶
Grid cell editor for string/text data.
See also
wx.grid.GridCellEditor, wx.grid.GridCellAutoWrapStringEditor, wx.grid.GridCellBoolEditor, wx.grid.GridCellChoiceEditor, wx.grid.GridCellEnumEditor, wx.grid.GridCellFloatEditor, wx.grid.GridCellNumberEditor, wx.grid.GridCellDateEditor
Class Hierarchy¶
Known Subclasses¶
wx.grid.GridCellAutoWrapStringEditor, wx.grid.GridCellFloatEditor, wx.grid.GridCellNumberEditor
Methods Summary¶
Text cell editor constructor. |
|
End editing the cell. |
|
The parameters string format is “n” where n is a number representing the maximum width. |
|
Set validator to validate user input. |
Class API¶
- class wx.grid.GridCellTextEditor(GridCellEditor)¶
Possible constructors:
GridCellTextEditor(maxChars=0) -> None
Grid cell editor for string/text data.
Methods¶
- __init__(self, maxChars=0)¶
Text cell editor constructor.
- Parameters:
maxChars (int) – Maximum width of text (this parameter is supported starting since wxWidgets 2.9.5).
- Return type:
None
- EndEdit(self, row, col, grid, oldval)¶
End editing the cell.
This function must check if the current value of the editing cell is valid and different from the original value in its string form. If not then simply return None. If it has changed then this method should save the new value so that ApplyEdit can apply it later and the string representation of the new value should be returned.
Notice that this method shoiuld not modify the grid as the change could still be vetoed.
- Return type:
Any
- SetParameters(self, params)¶
The parameters string format is “n” where n is a number representing the maximum width.
- Parameters:
params (string)
- Return type:
None
- SetValidator(self, validator)¶
Set validator to validate user input.
- Parameters:
validator (wx.Validator)
- Return type:
None
Added in version 2.9.5.