1. Home
  2. Check box Control (Genstat Resource Language)

Check box Control (Genstat Resource Language)

A check box is a small, rectangular box that can be clicked on and off. The text label is typically displayed to the right of the box. There are two types of check box controls available:

  1. CHECKBOX used to represent a set of options that returns a list of strings.
  2. TOGGLEBOX used to return a string for a true or false result.

CHECKBOX Control

CHECKBOX text, id, x, y, width, height, flags, response text

text
The text that is displayed to the right of the check box.

id
The id is a string that identifies controls within the resource file. If the control returns a result to the attached Genstat procedure, this must use the same name as the procedures option or parameter that the result is for.

flags
The flags for the check box can be one of the following:

GW_SEL Initially selects the check box.
GW_OPT Specifies that the check box is for an OPTION in the attached procedure. This is the default setting.
GW_PARAM Specifies that the check box is for a PARAMETER in the attached procedure.

Note: only one of the flags GW_OPT or GW_PARAM can be set. To specify more than one flag use the ‘|’ character. For example, GW_SET | GW_OPT.

response text
If a check box is selected, the response text will be the string that is passed to the associated Genstat procedure when it is activated.

Grouping check boxes
Check boxes for returning a list of strings are grouped together by specifying the same id for each of the check boxes in the group.

Example
The following example demonstrates how to create a check box:

CHECKBOX “Standard error”, SELECT, 10, 10, 90, 14, GW_OPT, “se”

TOGGLEBOX Control

TOGGLEBOX text, id, x, y, width, height, flags, response text 1, response text 2

text
The text that is displayed to the right of the check box.

id
The id is a string that identifies controls within the resource file. If the control returns a result to the attached Genstat procedure, this must use the same name as the procedures option or parameter that the result is for.

flags
The flags for the check box can be one of the following:

GW_SEL Initially selects the check box.
GW_OPT Specifies that the check box is for an OPTION in the attached procedure.
GW_PARAM Specifies that the check box is for a PARAMETER in the attached procedure.

Note: only one of the flags GW_OPT or GW_PARAM can be set. To specify more than one flag use the ‘|’ character. For example, GW_SET | GW_OPT.

response text 1
If the check box is selected, this response text will be the string that is passed to the associated Genstat procedure when it is activated.

response text 2
If the check box is not selected, this response text will be the string that is passed to the associated Genstat procedure when it is activated.

Example
The following example demonstrates how to create a toggle check box:

TOGGLEBOX “Standard error”, SELECT, 10, 10, 90, 14, GW_OPT, “yes”,”no”

See also

Updated on May 8, 2019

Was this article helpful?