Skip to content

RadioGroupControl


Members

callback

desc: A callback that will be called whenever a RadioButton in this RadioGroup is pressed, it is called with GridGUI.RadioGroupControl.Checked as an argument. If set to false the callback will be ignored.

type: Func|BoundFunc|false

default: false

meta: [object]

Checked

desc: An object containing information on the most recently checked RadioButton. The object contains the index under the key "index", the GridGUI.ArbitraryControl object under the key "ctrl" and the text of the RadioButton under the key "text".

type: object

default: {}

meta: [object]

guiHwnd

desc: The hwnd of the GUI that new RadioButtons will be added to if the guiHwnd parameter is not set when calling GridGUI.RadioGroupControl.New.

type: hwnd

RadioButtons

desc: An array of the RadioButtons that are associated with this RadioGroup.

type: array

default: []

meta: [object]

Methods

__Callback

__Callback(ctrl)

An internal callback that is registered to all the RadioButtons of this RadioGroup. The callback is used to uncheck the RadioButtons what where not clicked, to update the GridGUI.RadioGroupControl.Checked member and to call the user defined callback GridGUI.RadioGroupControl.callback.

parameters

name: ctrl

desc: The control object of the RadioButton that was clicked.

type: GridGUI.ArbitraryControl

__New

__New(guiHwnd, callback := false)

Constructor.

parameters

name: guiHwnd

desc: The hwnd of the GUI that the RadioButtons that are added to this RadioGroup should be added to by default.

type: hwnd

name: callback

desc: The callback that should be called whenever a RadioButton in this RadioGroup is pressed, it is called with GridGUI.RadioGroupControl.Checked as an argument. If set to false the callback will be ignored.

type: Func|BoundFunc|false

default: false

meta: [object]

return value

Check

Check(index)

Checks a RadioButton in GridGUI.RadioGroupControl.RadioButtons by its index.

parameters

name: index

desc: The index of the RadioButton to check.

type: number

New

New(options := "", text := "", guiHwnd := false)

Adds a new RadioButton to this RadioGroup and to a GUI.

parameters

name: options

desc: The options that the RadioButton will be created with. Does not accept vVars and gLabels.

type: string

default: ""

link: link

name: text

desc: The text that will be displayed next to the new RadioButton.

type: string

default: ""

name: guiHwnd

desc: The hwnd of the GUI that the new RadioButton will be added to. If left unset then the RadioButton will be added to GridGUI.RadioGroupControl.guiHwnd.

type: bool

default: false

return value

desc: The control object for the newly added RadioButton.

type: GridGUI.ArbitraryControl

Back to top