Updated Checkbox (markdown)
@@ -3,7 +3,7 @@ Checkbox are objects, which sets the value to true or false by clicking on them
|
||||
Here is a example of how to create a standard checkbox:
|
||||
|
||||
````lua
|
||||
local mainFrame = CreateFrame("myFirstFrame"):show()
|
||||
local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
|
||||
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):show()
|
||||
````
|
||||
|
||||
@@ -17,7 +17,7 @@ There are currently no unique functions. Everything you need you can see in the
|
||||
|
||||
Get and set the current value:
|
||||
````lua
|
||||
local mainFrame = CreateFrame("myFirstFrame"):show()
|
||||
local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
|
||||
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show()
|
||||
NyoUI.debug(aCheckbox:getValue()) - returns true
|
||||
````
|
||||
@@ -25,7 +25,7 @@ NyoUI.debug(aCheckbox:getValue()) - returns true
|
||||
|
||||
Create a onChange event:
|
||||
````lua
|
||||
local mainFrame = CreateFrame("myFirstFrame"):show()
|
||||
local mainFrame = NyoUI.createFrame("myFirstFrame"):show()
|
||||
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):onChange(function(self) NyoUI.debug("The value got changed into "..self:getValue()) end):show()
|
||||
|
||||
````
|
||||
|
||||
Reference in New Issue
Block a user