.. 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.DataViewChoiceRenderer.SetValue`  and :meth:`~wx.dataview.DataViewChoiceRenderer.GetValue`  operate on a variant holding a string. 







.. seealso:: :ref:`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.png" 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="wx.dataview.DataViewChoiceRenderer" alt="" coords="5,160,279,189"/> <area shape="rect" id="node2" href="wx.dataview.DataViewRenderer.html" title="wx.dataview.DataViewRenderer" alt="" coords="27,83,257,112"/> <area shape="rect" id="node3" href="wx.Object.html" title="wx.Object" alt="" coords="99,5,185,35"/> </map> 
   </p>
   </div>

|


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

:ref:`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)
       
   
   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







   .. method:: GetChoice(self, index)

      Returns the choice referred to by index.                  


      :param `index`: 
      :type `index`: int




      :rtype: `string`








   .. method:: GetChoices(self)

      Returns all choices.                  

      :rtype: `list of strings`








   .. attribute:: Choices

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

