1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
|
.. 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.DataViewCheckIconTextRenderer:
==========================================================================================================================================
|phoenix_title| **wx.dataview.DataViewCheckIconTextRenderer**
==========================================================================================================================================
This renderer class shows a checkbox in addition to the icon and text shown by the base class and also allows the user to toggle this checkbox.
By default this class doesn't allow the user to put the checkbox into the third, i.e. indeterminate, state, even though it can display the state if the program returns the corresponding value from the associated model. Call :meth:`~wx.dataview.DataViewCheckIconTextRenderer.Allow3rdStateForUser` explicitly if the user should be able to select the 3rd state interactively too.
This class is used internally by :ref:`wx.dataview.TreeListCtrl`, and can be seen in action in the corresponding sample.
:ref:`Core` ^^<>< =''>:</>&;&;< =''>\\ </></>
.. versionadded:: 4.1/wxWidgets-3.1.1
.. seealso:: :ref:`wx.dataview.DataViewIconTextRenderer`, :ref:`wx.dataview.DataViewToggleRenderer`
|
|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>DataViewCheckIconTextRenderer</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.DataViewCheckIconTextRenderer_inheritance.png" alt="Inheritance diagram of DataViewCheckIconTextRenderer" 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.DataViewCheckIconTextRenderer.html" title="wx.dataview.DataViewCheckIconTextRenderer" alt="" coords="5,160,328,189"/> <area shape="rect" id="node2" href="wx.dataview.DataViewRenderer.html" title="wx.dataview.DataViewRenderer" alt="" coords="52,83,281,112"/> <area shape="rect" id="node3" href="wx.Object.html" title="wx.Object" alt="" coords="123,5,210,35"/> </map>
</p>
</div>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.dataview.DataViewCheckIconTextRenderer.__init__` Create a new renderer.
:meth:`~wx.dataview.DataViewCheckIconTextRenderer.Allow3rdStateForUser` Allow the user to interactively select the 3rd state for the items rendered by this object.
:meth:`~wx.dataview.DataViewCheckIconTextRenderer.GetDefaultType`
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.dataview.DataViewCheckIconTextRenderer(DataViewRenderer)
**Possible constructors**::
DataViewCheckIconTextRenderer(mode=DATAVIEW_CELL_ACTIVATABLE,
align=DVR_DEFAULT_ALIGNMENT)
This renderer class shows a checkbox in addition to the icon and text
shown by the base class and also allows the user to toggle this
checkbox.
.. method:: __init__(self, mode=DATAVIEW_CELL_ACTIVATABLE, align=DVR_DEFAULT_ALIGNMENT)
Create a new renderer.
By default the renderer is activatable, i.e. allows the user to toggle the checkbox.
:param `mode`:
:type `mode`: wx.dataview.DataViewCellMode
:param `align`:
:type `align`: int
.. method:: Allow3rdStateForUser(self, allow=True)
Allow the user to interactively select the 3rd state for the items rendered by this object.
As described in the class overview, this renderer can always display the 3rd ("indeterminate") checkbox state if the model contains cells with ``wx.CHK_UNDETERMINED`` value, but it doesn't allow the user to set it by default. Call this method to allow this to happen.
:param `allow`: If ``True``, interactively clicking a checked cell switches it to the indeterminate value and clicking it again unchecks it. If ``False``, clicking a checked cell switches to the unchecked value, skipping the indeterminate one.
:type `allow`: bool
.. staticmethod:: GetDefaultType()
:rtype: `string`
|