WoW:API CheckButton SetChecked: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
({{widgetmethod}})
No edit summary
Line 1: Line 1:
{{widgetmethod}}
{{widgetmethod}} __NOTOC__
{{stub/api}}


Sets the status of a CheckButton. Set to 1 for checked status, or 0 for unchecked.
Sets the status of a CheckButton.
 
CheckButton:SetChecked(State);
 
== Parameters ==
=== Arguments ===
:(State)
 
:;State : Mixed - Basically expressions LUA evaluates to a number 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");
 
====Result====
Button is checked
 
== Example ==
CheckButton:SetChecked(false);
CheckButton:SetChecked(0);
CheckButton:SetChecked("foo");
CheckButton:SetChecked();
CheckButton:SetChecked({1,2,3});
 
====Result====
Button is unchecked

Revision as of 02:49, 18 June 2006

Widget API ← CheckButton < SetChecked

Sets the status of a CheckButton.

CheckButton:SetChecked(State);

Parameters

Arguments

(State)
State
Mixed - Basically expressions LUA evaluates to a number 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");

Result

Button is checked

Example

CheckButton:SetChecked(false);
CheckButton:SetChecked(0);
CheckButton:SetChecked("foo");
CheckButton:SetChecked();
CheckButton:SetChecked({1,2,3});

Result

Button is unchecked