phoenix_title 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 Class Hierarchy

Inheritance diagram for class GridCellTextEditor:

sub_classes Known Subclasses

wx.grid.GridCellAutoWrapStringEditor, wx.grid.GridCellFloatEditor, wx.grid.GridCellNumberEditor


method_summary Methods Summary

__init__

Text cell editor constructor.

EndEdit

End editing the cell.

SetParameters

The parameters string format is “n” where n is a number representing the maximum width.

SetValidator

Set validator to validate user input.


api Class API

class wx.grid.GridCellTextEditor(GridCellEditor)

Possible constructors:

GridCellTextEditor(maxChars=0)

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).



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.



SetParameters(self, params)

The parameters string format is “n” where n is a number representing the maximum width.

Parameters:

params (string) –



SetValidator(self, validator)

Set validator to validate user input.

Parameters:

validator (wx.Validator) –

New in version 2.9.5.