.. 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

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>GridCellFloatRenderer</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.grid.GridCellFloatRenderer_inheritance.png" alt="Inheritance diagram of GridCellFloatRenderer" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.grid.GridCellFloatRenderer.html" title="wx.grid.GridCellFloatRenderer" alt="" coords="105,237,321,267"/> <area shape="rect" id="node2" href="wx.grid.GridCellStringRenderer.html" title="wx.grid.GridCellStringRenderer" alt="" coords="101,160,324,189"/> <area shape="rect" id="node3" href="wx.grid.GridCellRenderer.html" title="wx.grid.GridCellRenderer" alt="" coords="121,83,305,112"/> <area shape="rect" id="node4" href="wx.SharedClientDataContainer.html" title="wx.SharedClientDataContainer" alt="" coords="5,5,228,35"/> <area shape="rect" id="node5" href="wx.RefCounter.html" title="wx.RefCounter" alt="" coords="251,5,369,35"/> </map> 
   </p>
   </div>

|


|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=-1, precision=-1,
                             format=GRID_FLOAT_FORMAT_DEFAULT)
       
   
   This class may be used to format floating point data in a cell.



   .. method:: __init__(self, width=-1, precision=-1, format=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








                  





   .. 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)

      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




                  



      .. versionadded:: 2.9.3 
     








   .. method:: 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)                   


      :param `params`: 
      :type `params`: string







   .. method:: SetPrecision(self, precision)

      Sets the precision.                  


      :param `precision`: 
      :type `precision`: int







   .. method:: SetWidth(self, width)

      Sets the width.                  


      :param `width`: 
      :type `width`: int







   .. 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`

