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 Allow3rdStateForUser explicitly if the user should be able to select the 3rd state interactively too.

This class is used internally by wx.dataview.TreeListCtrl, and can be seen in action in the corresponding sample.

Core ^^<>< =’’>:</>&;&;< =’’>\ </></>

New in version 4.1/wxWidgets-3.1.1.

See also

wx.dataview.DataViewIconTextRenderer, wx.dataview.DataViewToggleRenderer


class_hierarchy Class Hierarchy

Inheritance diagram for class DataViewCheckIconTextRenderer:

method_summary Methods Summary

__init__

Create a new renderer.

Allow3rdStateForUser

Allow the user to interactively select the 3rd state for the items rendered by this object.

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.


Methods

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

Parameters:


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.

Parameters:

allow (bool) – 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.



static GetDefaultType()
Return type:

string