WoW:API CheckButton SetChecked: Difference between revisions
Jump to navigation
Jump to search
m (Remove singature made using ~ in main namespace) |
m (Removed "talk".) |
||
| Line 37: | Line 37: | ||
Button is unchecked | Button is unchecked | ||
==Notes== | |||
Passing "nil" will uncheck the button, but passing *no* argument (although it should end up being nil for Lua) will enable it, also passing a table ({...}) will now check the button. | |||
Revision as of 20:37, 15 January 2010
← Widget API ← CheckButton < SetChecked
Sets the status of a CheckButton.
CheckButton:SetChecked(State);
Parameters
Arguments
- (State)
- State
- Mixed - Basically expressions LUA evaluates to true will check the button. Everything else will uncheck.
Returns
- nil
- nil
- This function will always return nil.
Example
CheckButton:SetChecked(true);
CheckButton:SetChecked(1);
CheckButton:SetChecked(-2397);
CheckButton:SetChecked("-2397");
CheckButton:SetChecked({1,2,3});
CheckButton:SetChecked("foo");
CheckButton:SetChecked();
Result
Button is checked
Example
CheckButton:SetChecked(false); CheckButton:SetChecked(0); CheckButton:SetChecked(nil);
Result
Button is unchecked
Notes
Passing "nil" will uncheck the button, but passing *no* argument (although it should end up being nil for Lua) will enable it, also passing a table ({...}) will now check the button.