diff --git a/Checkbox.md b/Checkbox.md index 49b8000..4e0a32c 100644 --- a/Checkbox.md +++ b/Checkbox.md @@ -15,9 +15,17 @@ There are currently no unique functions. Everything you need you can see in the # Examples +Get and set the current value: ````lua local mainFrame = CreateFrame("myFirstFrame"):show() local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show() NyoUI.debug(aCheckbox:getValue()) - returns true ```` +Create a onChange event: +````lua +local mainFrame = CreateFrame("myFirstFrame"):show() +local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):onChange(function(self) NyoUI.debug("The value got changed into "..self:getValue()) end):show() + +```` +