Module albow.widgets.RadioButton
Source code
from albow.widgets.CheckWidget import CheckWidget
from albow.widgets.RadioControl import RadioControl
class RadioButton(RadioControl, CheckWidget):
"""
RadioButton controls are intended to be used in a group to provide a multiple-choice selection. To achieve
this, all the radio buttons in the group should be linked via their ref attributes to the same value, and each
one given a unique setting. The one whose setting matches the current value displays its check mark, and
clicking on a radio button sets the value to that button's setting.
Note that a RadioButton does not have a title; you will need to place a Label beside it if you want one.
The visual appearance of a RadioButton is currently the same as a CheckBox. This may change in a later version.
"""
pass
Classes
class RadioButton (**kwds)-
RadioButton controls are intended to be used in a group to provide a multiple-choice selection. To achieve this, all the radio buttons in the group should be linked via their ref attributes to the same value, and each one given a unique setting. The one whose setting matches the current value displays its check mark, and clicking on a radio button sets the value to that button's setting.
Note that a RadioButton does not have a title; you will need to place a Label beside it if you want one.
The visual appearance of a RadioButton is currently the same as a CheckBox. This may change in a later version.
Creates a new widget, initially without any parent. If a rect is given, it specifies the new widget's initial s ize and position relative to its parent.
Args
rect- A PyGame rectangle defining the portion of the parent widget's coordinate system occupied by the
widget. Modifying this rectangle changes the widget's size and position.
**kwds- Additional attributes specified as key-value pairs
Source code
class RadioButton(RadioControl, CheckWidget): """ RadioButton controls are intended to be used in a group to provide a multiple-choice selection. To achieve this, all the radio buttons in the group should be linked via their ref attributes to the same value, and each one given a unique setting. The one whose setting matches the current value displays its check mark, and clicking on a radio button sets the value to that button's setting. Note that a RadioButton does not have a title; you will need to place a Label beside it if you want one. The visual appearance of a RadioButton is currently the same as a CheckBox. This may change in a later version. """ passAncestors
Inherited members
RadioControl:CheckWidget:addadd_anchoradd_centeredanchorattention_lostaugment_mouse_eventbg_colorbg_imageborder_colorborder_widthcall_handlercall_parent_handlerdefault_sizedefer_drawingdismissdrawdraw_overfg_colorfocusfocus_switchfontget_cursorget_focusget_margin_rectget_rootget_top_widgetget_visibleglobal_to_localhas_focusinheritedinvalidateis_gl_containerkey_downkey_uplocal_to_globalmarginmenu_barparentparent_resizedpresentrectrelative_moderemoveremove_anchorresizedscale_bgsel_colorset_parentset_size_for_textsmoothtab_stopvisible