RadioBox#

class ansys.scade.guitools.control.RadioBox(owner, buttons: List[Tuple[str, str]], x: int, y: int, w: int, text: str = '', h: int = c.GROUP_RADIO_BOX_HEIGHT)#

Bases: scade.tool.suite.gui.widgets.GroupBox

Defines a bundle made of a group and a set of radio button controls.

The group is hidden when text is empty.

Parameters#

ownerAny

Owner of the control.

buttonslist[tuple[str, str]]

Descriptions of the buttons: value and text associated to the buttons.

xint

Horizontal position of the control.

yint

Vertical position of the control.

wint

Width of the control.

hint

Height of the control, default 0.

textstr

Text of the group control, default empty.

kwargsAny

Other parameters of scade.tool.suite.gui.widgets.GroupBox.

Initialize the radio box with the given parameters.

Overview#

get_value

Return the value of the selected button, or "" when none is selected.

on_layout

Declare the constraints with respect to the owner.

set_value

Select the button corresponding to the input value.

set_visible

Show or hide the control.

Import detail#

from ansys.scade.guitools.control import RadioBox

Attribute detail#

RadioBox.buttons: Dict[str, scade.tool.suite.gui.widgets.RadioButton]#
RadioBox.owner#
RadioBox.text = ''#

Method detail#

RadioBox.get_value() str#

Return the value of the selected button, or "" when none is selected.

RadioBox.on_layout()#

Declare the constraints with respect to the owner.

RadioBox.set_value(value: str)#

Select the button corresponding to the input value.

  • No button is selected when value is "".

  • The first button is selected if value does not correspond to any button.

Parameters#

valuestr

Input value corresponding to a button.

RadioBox.set_visible(show: bool)#

Show or hide the control.