Skip to main content

addObjectCheckBox

Creates a checkbox: a small rectangle followed by text, which toggles its state and generates an event when tapped with the pen. The text is displayed in the current font.

wizCtl.addObjectCheckBox(id, x, y, text, options)
ParameterDescription
id

String that identifies the checkbox.
Cannot be any of the values reserved for text or button objects: who, why, ok, clear, cancel, delete.

x, y

Position of the top-left corner of the object on the pad display.
The value is either an absolute position in pixels or one of the following strings:

  • x: "left", "right", "centre"
  • y: "top", "middle", "bottom"
textText to display.
options

A combination of sigSDK.CheckboxOptions values that sets the initial state and the check symbol. (Optional)

Return values
The added checkbox object. Throws an exception if an error occurs.

The returned object has the following properties:

PropertyDescription
rectThe displayed area, with upperLeftXpixel, upperLeftYpixel, lowerRightXpixel and lowerRightYpixel.
checkedIndicates whether the checkbox is checked.
onClickFunction called when the checkbox is tapped. It receives the object as a parameter and returns a boolean. Return true to stop capturing pen input, or false to continue.

The size of the box is set with the checkbox.size property of setProperty.

The following example adds a checkbox that is checked by default and shows a cross instead of a tick:

wizCtl.addObjectCheckBox("checkbox2", 10, 120, "Checked by default, with a cross.",
sigSDK.CheckboxOptions.CheckboxChecked.value | sigSDK.CheckboxOptions.CheckboxDisplayCross.value);