Zum Hauptinhalt springen

RadioGroup():hasDefaultValue()

Prüft, ob die Gruppe mit einer Standardschaltfläche erstellt wurde.

Signatur​

hasDefaultValue(): boolean

Rückgabe

boolean – true, wenn eine Standardschaltflächen-ID an RadioGroup(id, defaultButtonId) übergeben wurde.

Beispiel​

local group = RadioGroup(5, 2)
group:add(RadioButton(1, "Small"))
group:add(RadioButton(2, "Large"))
if group:hasDefaultValue() then
toast("Default: " .. group:getDefaultButtonId())
end