Page Contents

This Page

CheckBox

class enaml.widgets.check_box.CheckBox(parent=None, **kwargs)[source]

Bases: enaml.widgets.abstract_button.AbstractButton

An checkable button represented by a standard check box widget.

Use a check box when it’s necessary to toggle a boolean value independent of any other widgets in a group.

When its necessary to allow the toggling of only one value in a group of values, use a group of RadioButtons or the RadioGroup control from the Enaml standard library.

The interface for AbstractButton fully defines the interface for a CheckBox.

checkable = None

Check boxes are checkable by default.

__implements__

alias of __NoInterface__

Backends

Qt

digraph inheritanceb45d1d0dfd { rankdir=LR; width=8.0; ratio=compress; fontsize=14; size="8.0, 12.0"; "QtCheckBox" [style="setlinewidth(0.5)",URL="#enaml.qt.qt_check_box.QtCheckBox",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtAbstractButton" -> "QtCheckBox" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtAbstractButton" [style="setlinewidth(0.5)",URL="enaml.widgets.abstract_button.AbstractButton.html#enaml.qt.qt_abstract_button.QtAbstractButton",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtControl" -> "QtAbstractButton" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.widget.Widget.html#enaml.qt.qt_widget.QtWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtObject" -> "QtWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtControl" [style="setlinewidth(0.5)",URL="enaml.widgets.control.Control.html#enaml.qt.qt_control.QtControl",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtConstraintsWidget" -> "QtControl" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtConstraintsWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.constraints_widget.ConstraintsWidget.html#enaml.qt.qt_constraints_widget.QtConstraintsWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtWidget" -> "QtConstraintsWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QtObject" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25]; }

class enaml.qt.qt_check_box.QtCheckBox(object_id, parent, session)[source]

Bases: enaml.qt.qt_abstract_button.QtAbstractButton

A Qt implementation of an Enaml CheckBox.

create_widget(parent, tree)[source]

Create the underlying check box widget.

Wx

digraph inheritance8eb7d3b3c0 { rankdir=LR; width=8.0; ratio=compress; fontsize=14; size="8.0, 12.0"; "WxObject" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25]; "WxControl" [style="setlinewidth(0.5)",URL="enaml.widgets.control.Control.html#enaml.wx.wx_control.WxControl",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxConstraintsWidget" -> "WxControl" [arrowsize=0.5,style="setlinewidth(0.5)"]; "WxCheckBox" [style="setlinewidth(0.5)",URL="#enaml.wx.wx_check_box.WxCheckBox",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxAbstractButton" -> "WxCheckBox" [arrowsize=0.5,style="setlinewidth(0.5)"]; "WxWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.widget.Widget.html#enaml.wx.wx_widget.WxWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxObject" -> "WxWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "WxAbstractButton" [style="setlinewidth(0.5)",URL="enaml.widgets.abstract_button.AbstractButton.html#enaml.wx.wx_abstract_button.WxAbstractButton",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxControl" -> "WxAbstractButton" [arrowsize=0.5,style="setlinewidth(0.5)"]; "WxConstraintsWidget" [style="setlinewidth(0.5)",URL="enaml.widgets.constraints_widget.ConstraintsWidget.html#enaml.wx.wx_constraints_widget.WxConstraintsWidget",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxWidget" -> "WxConstraintsWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class enaml.wx.wx_check_box.WxCheckBox(object_id, parent, session)[source]

Bases: enaml.wx.wx_abstract_button.WxAbstractButton

A Wx implementation of an Enaml CheckBox.

create_widget(parent, tree)[source]

Creates the underlying wxProperCheckBox.

create(tree)[source]

Create and initialize the check box control.

set_checkable(checkable)[source]

Sets whether or not the widget is checkable.

get_checked()[source]

Returns the checked state of the widget.

set_checked(checked)[source]

Sets the widget’s checked state with the provided value.