.. 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
Inheritance diagram for class DataViewChoiceRenderer:
| |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) 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`