docs
This commit is contained in:
@@ -5,7 +5,7 @@ Remember checkbox also inherits from [Object](objects/Object.md)
|
||||
A checkbox does not have any custom methods. All required methods are provided by the base [object](objects/Object.md) class.
|
||||
|
||||
# Example
|
||||
This is how you would create a event which gets fired as soon as the value gets changed.
|
||||
This is how you would create a event which gets fired as soon as the value gets changed:
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame()
|
||||
local aCheckbox = mainFrame:addCheckbox()
|
||||
@@ -17,7 +17,7 @@ end
|
||||
aCheckbox:onChange(checkboxChange)
|
||||
```
|
||||
|
||||
## Lua and XML:
|
||||
also possible via xml:
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame():addLayout("example.xml")
|
||||
|
||||
@@ -28,6 +28,6 @@ end)
|
||||
```
|
||||
|
||||
```xml
|
||||
<button onChange="checkboxChange" />
|
||||
<checkbox onChange="checkboxChange" />
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user