wx.grid.GridCellFloatRenderer¶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
Methods Summary¶__init__ |
Float cell renderer constructor. |
GetFormat |
Returns the specifier used to format the data to string. |
GetPrecision |
Returns the precision. |
GetWidth |
Returns the width. |
SetFormat |
Set the format to use for display the number. |
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) |
SetPrecision |
Sets the precision. |
SetWidth |
Sets the width. |
Properties Summary¶Format |
See GetFormat and SetFormat |
Precision |
See GetPrecision and SetPrecision |
Width |
See GetWidth and SetWidth |
Class API¶wx.grid.GridCellFloatRenderer(GridCellStringRenderer)¶Possible constructors:
GridCellFloatRenderer(width=-1, precision=-1,
format=GRID_FLOAT_FORMAT_DEFAULT)
This class may be used to format floating point data in a cell.
__init__(self, width=-1, precision=-1, format=GRID_FLOAT_FORMAT_DEFAULT)¶Float cell renderer constructor.
| Parameters: |
|
|---|
GetFormat(self)¶Returns the specifier used to format the data to string.
The returned value is a combination of wx.grid.GridCellFloatFormat elements.
| Return type: | int |
|---|
New in version 2.9.3.
GetPrecision(self)¶Returns the precision.
| Return type: | int |
|---|
GetWidth(self)¶Returns the width.
| Return type: | int |
|---|
SetFormat(self, format)¶Set the format to use for display the number.
| Parameters: | format (int) – Must be a combination of wx.grid.GridCellFloatFormat enum elements. |
|---|
New in version 2.9.3.
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) – |
|---|
SetPrecision(self, precision)¶Sets the precision.
| Parameters: | precision (int) – |
|---|
SetWidth(self, width)¶Sets the width.
| Parameters: | width (int) – |
|---|
Precision¶See GetPrecision and SetPrecision