-
-
Notifications
You must be signed in to change notification settings - Fork 26
CheckBox
coding.jackalope edited this page Jan 20, 2021
·
6 revisions
Check boxes are controls that will display an empty box with an optional label. The function will return true if the user has clicked on the box. The code is then responsible for updating the checked flag to be passed back into the function. Below is an example usage of this control.
Slab.BeginWindow('MyFirstWindow', {Title = "My First Window"})
if Slab.CheckBox(Checked, "Check Box") then
Checked = not Checked
end
Slab.EndWindow()
Below is a list of functions associated with the Check Box API.
Renders a check box with a label. The check box when enabled will render an 'X'.
Parameter | Type | Description |
---|---|---|
Enabled | Boolean | Will render an 'X' within the box if true. Will be an empty box otherwise. |
Label | String | The label to display after the check box. |
Options | Table | List of options for how this check box will behave. |
Option | Type | Description |
---|---|---|
Tooltip | String | Text to be displayed if the user hovers over the check box. |
Id | String | An optional Id that can be supplied by the user. By default, the Id will be the label. |
Rounding | Number | Amount of rounding to apply to the corners of the check box. |
Size | Number | The uniform size of the box. The default value is 16. |
Disabled | Boolean | Dictates whether this check box is enabled for interaction. |
Return | Description |
---|---|
Boolean | Returns true if the user clicks within the check box. |