.. 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.dataview.DataViewChoiceRenderer:

==========================================================================================================================================
|phoenix_title|  **wx.dataview.DataViewChoiceRenderer**
==========================================================================================================================================

A :ref:`wx.dataview.DataViewCtrl`  renderer using :ref:`wx.Choice`  control and values of strings in it. 
         

This class is used by :ref:`wx.dataview.DataViewCtrl`  to render choice controls. It stores a string so that :meth:`~wx.dataview.DataViewRenderer.SetValue`  and :meth:`~wx.dataview.DataViewRenderer.GetValue`  operate on a variant holding a string. 









.. seealso:: `DataViewChoiceByIndexRenderer`       







|

|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>DataViewChoiceRenderer</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.dataview.DataViewChoiceRenderer_inheritance.svg" alt="Inheritance diagram of DataViewChoiceRenderer" 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.dataview.DataViewChoiceRenderer.html" title="A wx.dataview.DataViewCtrl  renderer using wx.Choice  control and values of strings in it." alt="" coords="5,159,312,188"/> <area shape="rect" id="node2" href="wx.dataview.DataViewRenderer.html" title="This class is used by wx.dataview.DataViewCtrl  to render the individual cells." alt="" coords="31,82,287,111"/> <area shape="rect" id="node3" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="109,5,208,34"/> </map> 
   </p>
   </div>

|


|sub_classes| Known Subclasses
==============================

`DataViewChoiceByIndexRenderer`     

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.dataview.DataViewChoiceRenderer.__init__`                             The constructor.
:meth:`~wx.dataview.DataViewChoiceRenderer.GetChoice`                            Returns the choice referred to by index.
:meth:`~wx.dataview.DataViewChoiceRenderer.GetChoices`                           Returns all choices.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.dataview.DataViewChoiceRenderer.Choices`                              See :meth:`~wx.dataview.DataViewChoiceRenderer.GetChoices`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.dataview.DataViewChoiceRenderer(DataViewRenderer)

   **Possible constructors**::

       DataViewChoiceRenderer(choices, mode=DATAVIEW_CELL_EDITABLE,
                              alignment=DVR_DEFAULT_ALIGNMENT) -> None
       
   
   A DataViewCtrl renderer using Choice control and values of strings
   in it.



   .. method:: __init__(self, choices, mode=DATAVIEW_CELL_EDITABLE, alignment=DVR_DEFAULT_ALIGNMENT)

      The constructor. 
                 


      :param `choices`: 
      :type `choices`: list of strings
      :param `mode`: 
      :type `mode`: wx.dataview.DataViewCellMode
      :param `alignment`: 
      :type `alignment`: int




      :rtype: `None`     








   .. method:: GetChoice(self, index)

      Returns the choice referred to by index. 
                 




      :param `index`: A valid index, i.e. a value between 0 and number of choices minus one.   
      :type `index`: int






      :rtype: `str`




                  





   .. method:: GetChoices(self)

      Returns all choices. 
                 

      :rtype: `List[str]`     








   .. attribute:: Choices

      See :meth:`~wx.dataview.DataViewChoiceRenderer.GetChoices`

