ButtonGroup
This widgets helps you manage a group of check boxes or radio buttons, making sure that only one can be selected at a time. It simplifies handling of multiple buttons by letting you know which one’s clicked or selected within the group.
local group = GroupBox()
You can add buttons (radio button and check box) to the widget using the addButton(button)
local maleButton = RadioButton('Male')
local femaleButton = RadioButton('Female')
group:addButton(maleButton)
group:addButton(femaleButton)
Important
Don not add the ButtonGroup to any layout. First, add the button to the ButtonGroup. After that, add the button to any layout you prefer, as shown below.
local boolean = RadioButton('True')
group:addButton(boolean)
layout:addChild(boolean)
Properties
- addChild(widget, label, icon: optional)
Adds a widget in a tab to the accordion with a given label, and an icon if necessary
- addLayout(layout, label, icon: optional)
Adds a layout in a tab to the accordion with a given label, and an icon if necessary
checkout Using resources
- setToolTip(text)
Tooltips are brief informational messages that appear when the user hovers the mouse pointer over the tab
- getCurrentIndex()
Gets the current index of the visible tab
- setCurrentIndex(index)
Sets the index of the tab to be visible