checkbox

This type represents a checkbox control.

This type inherits control type. All of its base methods and fields are also available in this type.

__call

Constructs the checkbox.

Arguments

Name

Type

Description

Returns

Type

Description

checkbox

Checkbox instance.

Example

local cb = gui.checkbox(gui.control_id('my_id'));

get_value

Returns checkbox' value.

Arguments

None.

Returns

Type

Description

Example

local val = cb:get_value():get();

set_value

Sets checkbox' value.

It is advised to use this method instead of value_param's set method.

Arguments

Name

Type

Description

val

bool

New value.

Returns

Nothing.

Example

cb:set_value(true);

Last updated