This class may be used to format floating point data in a cell.
See also
wx.grid.GridCellRenderer, wx.grid.GridCellAutoWrapStringRenderer, wx.grid.GridCellBoolRenderer, wx.grid.GridCellDateTimeRenderer, wx.grid.GridCellEnumRenderer, wx.grid.GridCellNumberRenderer, wx.grid.GridCellStringRenderer
Float cell renderer constructor. |
|
Returns the specifier used to format the data to string. |
|
Returns the precision. |
|
Returns the width. |
|
Set the format to use for display the number. |
|
The parameters string format is “width[,precision[,format]]” where |
|
Sets the precision. |
|
Sets the width. |
See |
|
wx.grid.
GridCellFloatRenderer
(GridCellStringRenderer)¶Possible constructors:
GridCellFloatRenderer(width: int=-1, precision: int=-1, format:
int=GRID_FLOAT_FORMAT_DEFAULT) -> None
This class may be used to format floating point data in a cell.
__init__
(self, width: int=-1, precision: int=-1, format: int=GRID_FLOAT_FORMAT_DEFAULT)¶Float cell renderer constructor.
width (int) – Minimum number of characters to be shown.
precision (int) – Number of digits after the decimal dot.
format (int) – The format used to display the string, must be a combination of wx.grid.GridCellFloatFormat enum elements. This parameter is only available since wxWidgets 2.9.3.
None
GetFormat
(self)¶Returns the specifier used to format the data to string.
The returned value is a combination of wx.grid.GridCellFloatFormat elements.
int
New in version 2.9.3.
GetPrecision
(self)¶Returns the precision.
int
GetWidth
(self)¶Returns the width.
int
SetFormat
(self, format : int)¶Set the format to use for display the number.
format (int) – Must be a combination of wx.grid.GridCellFloatFormat enum elements.
None
New in version 2.9.3.
SetParameters
(self, params : str)¶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) –
None
SetPrecision
(self, precision : int)¶Sets the precision.
precision (int) –
None
SetWidth
(self, width : int)¶Sets the width.
width (int) –
None
Precision
¶See GetPrecision
and SetPrecision