tsc_CheckboxField

This is a standard checkbox control based on tsc_Control.

The image on the right shows a variety of checkbox types and states. 

Constructor

tsc_CheckboxField (x_Code prompt, bool value);

Constructs a checkbox field with a prompt and an initial checked value.

 

Methods

bool Value () const;

void Value (bool newValue);

These two methods allow the checked state of the control to be queried or changed.

 

void SetCheckBoxDisplayAsSwitch (bool displayAsSwitch);

There are two styles of check box display available: the standard default 'tickable' check box style and a sliding switch display style. The standard check box style is typically used for setting options or settings on or off, and the switch display style is used when the item is controlling the display, or use, of other fields on the form.

By default, check boxes are displayed using the 'tickable' style, but the style can be controlled with this method.

Note: The layout flag tsc_Layout_PromptInline  can be used to have the check box or switch displayed on the same line as the prompt.

Checkbox examples