Example
new RadioGroup({
items: [
new CheckBox({
style: {
unchecked: `switch_off.png`,
checked: `switch_on.png`,
}
}),
new CheckBox({
style: {
unchecked: `switch_off.png`,
checked: `switch_on.png`,
}
}),
new CheckBox({
style: {
unchecked: `switch_off.png`,
checked: `switch_on.png`,
}
}),
],
type: 'vertical'
});
Extends
- Container
Members
innerView List | undefined
List, that holds and control all inned checkboxes.
onChange Signal<(selectedItemID: number, selectedVal: string) => void>
Fires, when new item is selected.
ID of the selected item.
- Default Value:
- 0
Text value of the selected item.
- Default Value:
- ""
itemConnections SignalConnection[] protected
This group's own subscriptions to each item, so they can be released individually. Calling onChange.disconnectAll() on a CheckBox would also sever the connection it makes to its own onCheck signal.
Methods
Add items to a group.
| Name | Type | Description |
|---|---|---|
items |
Array<CheckBox> |
array of CheckBox instances. |
Initiates a group.
| Name | Type | Description |
|---|---|---|
options |
RadioBoxOptions |
Remove items from a group.
| Name | Type | Description |
|---|---|---|
ids |
number[] |
Select item by ID.
| Name | Type | Description |
|---|---|---|
id |
number |
Detaches every item, so a repeated init() does not stack duplicates.