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.

__implements__

alias of __NoInterface__

Backends

Qt

Inheritance diagram of enaml.qt.qt_radio_button.QtRadioButton

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

Inheritance diagram of enaml.wx.wx_radio_button.WxRadioButton

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.