メインコンテンツまでスキップ

RadioGroup():showAsDropdown()

Shows the options as a dropdown instead of round buttons. Better for long lists. The answer is still the id of the chosen RadioButton.

A dropdown in a dialog

Signature​

showAsDropdown(label: string): RadioGroup

Parameters​

ParametersTypeDescription
labelstringThe label on the dropdown

Returns

RadioGroup, so calls can chain

Example​

local stage = RadioGroup(7, 1)
stage:add(RadioButton(1, "Stage 1"))
stage:add(RadioButton(2, "Stage 2"))
stage:add(RadioButton(3, "Stage 3"))
Dialog:add(stage:showAsDropdown("Stage"))