"state"

Sets or reads the status of a check box.

Synopsis

setValue(string shape, "state", int n, bool ok);

getValue(string shape, "state", int n, bool &ok);

shape.state(int n, bool ok);

Parameters

Parameter Description
shape Name of the object
n Box index, starting with 0
ok Checked or not checked

Description

Sets or reads the status of the "n"th field of a check box as bool whereby "ok"==TRUE indicates that the box is activated. Remember that the box index starts at 0.

Example

In the following example, the status of the fifth box (index 4) of the "chbox1" check box is tested and generated.

main()
{
  shape b=getShape("chbox1");
  if(b.state(4)==TRUE)
    DebugN("Checked");
  else
    DebugN("Not checked");
}

Assignment

Check box