Page Contents

This Page

RadioButton

class enaml.widgets.radio_button.RadioButton(parent=None, **kwargs)[source]

Bases: enaml.widgets.abstract_button.AbstractButton

An exclusive checkable button represented by a standard radio button widget.

Use a radio button to toggle the value of a boolean field. For a group of radio buttons with the same widget parent, only one radio button may be selected at a time. This makes groups of radio buttons useful for selecting amongst a discrete set of values. For multiple groups of independent radio buttons, place each group of buttons in their own Container.

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

checkable = None

Radio buttons are checkable by default.

Backends

Qt

digraph inheritance7b36ec93a9 { rankdir=LR; width=8.0; ratio=compress; fontsize=14; size="8.0, 12.0"; "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)"]; "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)"]; "QtObject" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25]; "QtRadioButton" [style="setlinewidth(0.5)",URL="#enaml.qt.qt_radio_button.QtRadioButton",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "QtAbstractButton" -> "QtRadioButton" [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)"]; "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)"]; }

class enaml.qt.qt_radio_button.QtRadioButton(object_id, parent, session)[source]

Bases: enaml.qt.qt_abstract_button.QtAbstractButton

A Qt implementation of an Enaml RadioButton.

create_widget(parent, tree)[source]

Create the underlying radio button widget.

Wx

digraph inheritance578811147a { rankdir=LR; width=8.0; ratio=compress; fontsize=14; size="8.0, 12.0"; "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)"]; "WxRadioButton" [style="setlinewidth(0.5)",URL="#enaml.wx.wx_radio_button.WxRadioButton",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25,shape=box,fontsize=10]; "WxAbstractButton" -> "WxRadioButton" [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)"]; "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)"]; "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)"]; "WxObject" [shape=box,style="setlinewidth(0.5)",fontsize=10,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,height=0.25]; }

class enaml.wx.wx_radio_button.WxRadioButton(object_id, parent, session)[source]

Bases: enaml.wx.wx_abstract_button.WxAbstractButton

A Wx implementation of an Enaml RadioButton.

WxRadioButton uses a custom wx.RadioButton control. Radio buttons with the same parent will be mutually exclusive. For independent groups, place them in their own parent component.

create_widget(parent, tree)[source]

Creates the underlying custom wx.RadioButton control.

create(tree)[source]

Create and initialize the radio button 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.