Sfairadora

  • Reference Guide

Radio Button

The radio button allows the user to make a particular data item to be set to a particular predefined value. Radio buttons are most often used in groups, where all radio buttons affect the same data item, but set it to different values. A radio button can therefore be in two states: switched on, if the data item is equal to the value assigned to the radio button, and switched off otherwise. You can also specify a default value, which is set when a switched-on button is clicked. This value should not correspond to the value assigned to any other radio button in the group belonging to the given data item so that the data item is switched to the “none of the options” state.
The radio button looks either like a circle that can contain a bullet or like a button that is either pressed or not pressed. The neutral state is not graphically distinguished; it can be inferred from a group of radio buttons where no button is switched on.
Often it is more comfortable to use a single value selector dispel or a disp‑folder containing a value selector instead of a group of radio buttons.

Display

Item
Description
Title
Text displayed on the radio button.
Other
Style
Radio button appearance:
flat in window
the usual appearance with the bullet on the left. If you specify an icon, a button with the icon will be displayed instead of the bullet; this button can be pressed down.
flat on bar
in the switched-off state, it looks like a simple text without a frame; when touched by the mouse pointer or activated, a frame appears (the button is “lifted”). In the switched-on state it looks like a pressed button.
flat in menu
text with either the specified icon or a bullet on the left. When activated, the background color changes (standard behavior of menu items). The mark or icon on the left is present/pressed when the switched-on state is in place.
three-dimensional
common three-dimensional button that is pressed in the switched-on state.
three-dimensional low
three-dimensional button with a thinner frame so that it appears lower. It is pressed in the switched-on state.
auto
the style is determined adequately to the button location.
Icon
Icon displayed to the left of the title according to the selected style. The icon is entered using the icon editor.
Hide title
If checked, the title is not displayed on the button, and only the icon is displayed. Title text is displayed in the tool tip.
Borders
The spaces left between the button frame and the title. Values for all directions can be specified individually. If no value is specified, appropriate borders are determined automatically according to the title text.

Functionality

Item
Description
Object name
Name of the object where the edited data is located. You can select one of the objects provided by parent dispels.
Data reference
Reference to a data item within the above identified object.
The identified data should be of the same type as the value specified below. If this is not the case, type conversion is used to convert the value received from the data item to the type of the radio button value.
Value
Value assigned to the radio button. If the edited data item has this value, the radio button is switched on. Vice versa, the data item is set to this value by clicking (switching on) the radio button.
The value type is determined first. The editor appropriate for the type is displayed and can be used to enter a particular value.
Default allowed
If checked, a neutral value can be set by the radio button – that is, if the button is switched on, it can be switched off by another click.
Default value
The value inserted into the data item after the button is switched off.
Other
Data type
The data type that should be stored into the respective data item by the editor. Usually, it need not be specified – it is determined automatically from the actual type of the edited data. However, if the type of the edited data is Union, it may be necessary to specify the actual value to be inserted by the radio button.
Getter function
This function is used to determine the radio button state from the edited data. The returned value is compared to the value assigned to the radio button. This indirect method of determining the radio button state allows you to use the same getter function for all radio buttons in a group and only change the button values.
The function is specified in the Enki language.
Function parameter:
val
the current value of the data item determining the radio button state. Its type corresponds to the edited data item type. If data is absent, the NONE value is passed.
Result:
the value to be compared with the above assigned value. If they are equal, the radio button is switched on.
Setter function
This function is used to insert a value into the edited data item when the radio button state is changed.
The function is specified in the Enki language.
Function parameter:
val
value assigned to the radio button (either Value if the radio button is being switched on, or the Default value if the radio button is being switched off).
Result:
the value that will be saved into the data item. If the result type fails to match the type of the data item in which it should be stored, a type conversion is performed. If the function returns the NONE or NOT_PRESENT constant, and the edited data item is optional, its value is removed.
Disable closing volatile window
If the radio button is in a volatile window – that is, in a window that is automatically closed when an action in the window is performed (such as the menu window – see the Disp‑folder), then, when this option is checked, the window will not be closed by pressing the radio button.
Definition type: Radio_button_def