Phoenix Logo

phoenix_title wx.grid.GridCellFloatEditor

The editor for floating point numbers data.


class_hierarchy Class Hierarchy

Inheritance diagram for class GridCellFloatEditor:


method_summary Methods Summary

__init__ Float cell editor constructor.
EndEdit End editing the cell.
SetParameters The parameters string format is “width[,precision[,format]]” where format should be chosen between f|e|g|E|G (f is used by default)

api Class API



class wx.grid.GridCellFloatEditor(GridCellTextEditor)

Possible constructors:

GridCellFloatEditor(width=-1, precision=-1,
                    format=GRID_FLOAT_FORMAT_DEFAULT)

The editor for floating point numbers data.


Methods



__init__(self, width=-1, precision=-1, format=GRID_FLOAT_FORMAT_DEFAULT)

Float cell editor constructor.

Parameters:
  • 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)

Parameters:params (string) –