.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.grid.GridCellFloatRenderer:
==========================================================================================================================================
|phoenix_title| **wx.grid.GridCellFloatRenderer**
==========================================================================================================================================
This class may be used to format floating point data in a cell.
.. seealso:: :ref:`wx.grid.GridCellRenderer`, :ref:`wx.grid.GridCellAutoWrapStringRenderer`, :ref:`wx.grid.GridCellBoolRenderer`, :ref:`wx.grid.GridCellDateTimeRenderer`, :ref:`wx.grid.GridCellEnumRenderer`, :ref:`wx.grid.GridCellNumberRenderer`, :ref:`wx.grid.GridCellStringRenderer`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
GridCellFloatRenderer:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.grid.GridCellFloatRenderer.__init__` Float cell renderer constructor.
:meth:`~wx.grid.GridCellFloatRenderer.GetFormat` Returns the specifier used to format the data to string.
:meth:`~wx.grid.GridCellFloatRenderer.GetPrecision` Returns the precision.
:meth:`~wx.grid.GridCellFloatRenderer.GetWidth` Returns the width.
:meth:`~wx.grid.GridCellFloatRenderer.SetFormat` Set the format to use for display the number.
:meth:`~wx.grid.GridCellFloatRenderer.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)
:meth:`~wx.grid.GridCellFloatRenderer.SetPrecision` Sets the precision.
:meth:`~wx.grid.GridCellFloatRenderer.SetWidth` Sets the width.
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.grid.GridCellFloatRenderer.Format` See :meth:`~wx.grid.GridCellFloatRenderer.GetFormat` and :meth:`~wx.grid.GridCellFloatRenderer.SetFormat`
:attr:`~wx.grid.GridCellFloatRenderer.Precision` See :meth:`~wx.grid.GridCellFloatRenderer.GetPrecision` and :meth:`~wx.grid.GridCellFloatRenderer.SetPrecision`
:attr:`~wx.grid.GridCellFloatRenderer.Width` See :meth:`~wx.grid.GridCellFloatRenderer.GetWidth` and :meth:`~wx.grid.GridCellFloatRenderer.SetWidth`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: 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.
.. method:: __init__(self, width: int=-1, precision: int=-1, format: int=GRID_FLOAT_FORMAT_DEFAULT)
Float cell renderer constructor.
:param `width`: Minimum number of characters to be shown.
:type `width`: int
:param `precision`: Number of digits after the decimal dot.
:type `precision`: int
:param `format`: The format used to display the string, must be a combination of :ref:`wx.grid.GridCellFloatFormat` enum elements. This parameter is only available since wxWidgets 2.9.3.
:type `format`: int
:rtype: `None`
.. method:: GetFormat(self)
Returns the specifier used to format the data to string.
The returned value is a combination of :ref:`wx.grid.GridCellFloatFormat` elements.
:rtype: `int`
.. versionadded:: 2.9.3
.. method:: GetPrecision(self)
Returns the precision.
:rtype: `int`
.. method:: GetWidth(self)
Returns the width.
:rtype: `int`
.. method:: SetFormat(self, format : int)
Set the format to use for display the number.
:param `format`: Must be a combination of :ref:`wx.grid.GridCellFloatFormat` enum elements.
:type `format`: int
:rtype: `None`
.. versionadded:: 2.9.3
.. method:: 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)
:param `params`:
:type `params`: string
:rtype: `None`
.. method:: SetPrecision(self, precision : int)
Sets the precision.
:param `precision`:
:type `precision`: int
:rtype: `None`
.. method:: SetWidth(self, width : int)
Sets the width.
:param `width`:
:type `width`: int
:rtype: `None`
.. attribute:: Format
See :meth:`~wx.grid.GridCellFloatRenderer.GetFormat` and :meth:`~wx.grid.GridCellFloatRenderer.SetFormat`
.. attribute:: Precision
See :meth:`~wx.grid.GridCellFloatRenderer.GetPrecision` and :meth:`~wx.grid.GridCellFloatRenderer.SetPrecision`
.. attribute:: Width
See :meth:`~wx.grid.GridCellFloatRenderer.GetWidth` and :meth:`~wx.grid.GridCellFloatRenderer.SetWidth`