Contents Up Previous Next

Checkbox

A checkbox is a small box with a label, and can be in one of two states. It must be the child of a panel.

check-box-create
check-box-set-value
check-box-get-value


check-box-create

long ( check-box-create long panel-id string callback string label
optional long x optional long y
optional long width optional long height optional string style
optional string name)

Creates a checkbox on the given panel. The callback may be the empty string ("'') to denote no callback, or a word or string for the function name. The function will be called when the checkbox is turned on or off, with the checkbox ID as argument. If no position is given, the panel item is placed after the last item. The value -1 may be passed to denote a default, so that the position may be left unspecified and the size given.

The style parameter is reserved for future use.

name gives the checkbox a name that can be retrieved with window-get-name.


check-box-set-value

long ( check-box-set-value long check-box-id long value)

Set the check box value (0 or 1).


check-box-get-value

long ( check-box-get-value long check-box-id)

Gets the check box value (0 or 1).