Skip to main content

addObject

Adds an object of any type to the pad control list. It is a generic alternative to the type-specific addObject* methods.

wizCtl.addObject(type, id, x, y, data, options)
ParameterDescription
type

A value from the sigSDK.ObjectType enum:
ObjectText, ObjectButton, ObjectCheckbox, ObjectRadioButton, ObjectSignature, ObjectInput, ObjectInputEcho, ObjectImage, ObjectDisplayAtShutdown, ObjectInking or ObjectPrimitive.

idString that identifies the object. The reserved values depend on the object type. See the type-specific method for details.
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"
dataValue that depends on the object type. It matches the data parameter of the type-specific method.
optionsValue that depends on the object type. It matches the options parameter of the type-specific method. (Optional)
Return values
The added object. Throws an exception if an error occurs.

The following example adds a text object and an input object:

const infoObject = wizCtl.addObject(sigSDK.ObjectType.ObjectText, "txt", 10, 40, "Enter a 4 digit PIN code: ", null);
const inputObject = wizCtl.addObject(sigSDK.ObjectType.ObjectInput, "Input", 0, 0, {minLength: 1, maxLength: 4}, null);