Saltar al contenido principal

RadioGroup():hasDefaultValue()

Comprueba si el grupo se creó con un botón predeterminado.

Firma​

hasDefaultValue(): boolean

Devuelve

boolean - true cuando se pasó un id de botón predeterminado a RadioGroup(id, defaultButtonId).

Ejemplo​

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