Wikia

WoWWiki

API CheckButton SetChecked

Talk0
101,314pages on
this wiki
Widget API


Sets the status of a CheckButton.

CheckButton:SetChecked(State);

Parameters Edit

Arguments Edit

(State)
State 
Mixed - Basically expressions LUA evaluates to true will check the button. Everything else will uncheck.

Returns Edit

nil
nil 
This function will always return nil.

Example Edit

CheckButton:SetChecked(true);
CheckButton:SetChecked(1);
CheckButton:SetChecked(-2397);
CheckButton:SetChecked("-2397");
CheckButton:SetChecked({1,2,3});
CheckButton:SetChecked("foo");
CheckButton:SetChecked();

ResultEdit

Button is checked

Example Edit

CheckButton:SetChecked(false);
CheckButton:SetChecked(0);
CheckButton:SetChecked(nil);

ResultEdit

Button is unchecked

NotesEdit

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.

Around Wikia's network

Random Wiki