From 917f99f61180671eb1c3dad48fe3284dfbe886b8 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Mon, 2 May 2022 18:33:48 +0200 Subject: [PATCH] Updated Checkbox (markdown) --- Checkbox.md | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/Checkbox.md b/Checkbox.md index 401d10b..bf11705 100644 --- a/Checkbox.md +++ b/Checkbox.md @@ -1,27 +1,8 @@ -Checkbox are objects, which sets the value to true or false by clicking on them +With checkbox, the user can set a bool to true or false -Here is a example of how to create a standard checkbox: +Here are all possible functions available for checkbox: + Remember checkbox inherits from [object](https://github.com/NoryiE/NyoUI/wiki/Object): -````lua -local mainFrame = NyoUI.createFrame("myFirstFrame"):show() -local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):show() -```` - -This will create a default button with the size 1 width and 1 height on position 1 1 (relative to its parent frame), the default background is colors.lightBlue, the default text color is colors.black and the default zIndex is 5. The default value is false - -Here are all possible functions available for checkbox. Remember checkbox inherit from [object](https://github.com/NoryiE/NyoUI/wiki/Object): - -There are currently no unique functions. Everything you need you can see in the [object](https://github.com/NoryiE/NyoUI/wiki/Object) page. - -# Examples - -Get and set the current value: -````lua -local mainFrame = NyoUI.createFrame("myFirstFrame"):show() -local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show() -NyoUI.debug(aCheckbox:getValue()) - returns true -```` -
Create a onChange event: ````lua