본문으로 건너뛰기

RadioGroup():hasDefaultValue()

그룹이 기본 버튼과 함께 생성되었는지 확인합니다.

시그니처​

hasDefaultValue(): boolean

반환값

boolean - RadioGroup(id, defaultButtonId)에 기본 버튼 id가 전달되었으면 true입니다.

예시​

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