RadioButton

Screenshot

Radiobutton - Reference - Enaml-native - CodeLV

Example

from enamlnative.widgets.api import *

enamldef ContentView(Flexbox):
    flex_direction = "column"

    RadioGroup: rg:
        # Or set it
        RadioButton:
            text = "A"
        RadioButton:
            text = "B"
        RadioButton:
            text = "C"
            checked = True
    TextView:
        text << "Selected: {}".format(rg.checked.text if rg.checked else "None")

    RadioGroup: rg2:
        # Or set it
        checked = rg2.children[0]
        RadioButton:
            text = "A"
        RadioButton:
            text = "B"
        RadioButton:
            text = "C"
    TextView:
        text << "Selected: {}".format(rg2.checked.text if rg2.checked else "None")

Declaration

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

Bases: enamlnative.widgets.compound_button.CompoundButton

A simple control for displaying a RadioButton.

proxy

A reference to the ProxyLabel object.

Android Implementation

class enamlnative.android.android_radio_button.AndroidRadioButton[source]

Bases: enamlnative.android.android_compound_button.AndroidCompoundButton, enamlnative.widgets.radio_button.ProxyRadioButton

An Android implementation of an Enaml ProxyRadioButton.

widget

A reference to the widget created by the proxy.

create_widget()[source]

Create the underlying widget.

No iOS implementation found.