The editor for floating point numbers data.
See also
wx.grid.GridCellEditor, wx.grid.GridCellAutoWrapStringEditor, wx.grid.GridCellBoolEditor, wx.grid.GridCellChoiceEditor, wx.grid.GridCellEnumEditor, wx.grid.GridCellNumberEditor, wx.grid.GridCellTextEditor, wx.grid.GridCellDateEditor
Float cell editor constructor. |
|
End editing the cell. |
|
The parameters string format is “width[,precision[,format]]” where |
wx.grid.
GridCellFloatEditor
(GridCellTextEditor)¶Possible constructors:
GridCellFloatEditor(width=-1, precision=-1,
format=GRID_FLOAT_FORMAT_DEFAULT)
The editor for floating point numbers data.
__init__
(self, width=-1, precision=-1, format=GRID_FLOAT_FORMAT_DEFAULT)¶Float cell editor constructor.
width (int) – Minimum number of characters to be shown.
precision (int) – Number of digits after the decimal dot.
format (int) – The format to use for displaying the number, a combination of wx.grid.GridCellFloatFormat enum elements. This parameter is only available since wxWidgets 2.9.3.
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 “width[,precision[,format]]” where format
should be chosen between f|e|g|E|G (f is used by default)
params (string) –