Skip to main content

addObjectButton

Creates a button – text surrounded by a rectangle which generates a click event when tapped with the pen. Text is displayed in the current font

ParameterDescription
id

The following values have special meanings when used with a signature or input object:
ok - Accepts current input. With a signature, stores the captured signature in the signature object and terminates input. Until a signature has been captured, the button is disabled by the Wizard Control. With an Input object, the button is disabled until the required minimum number of characters has been entered.
clear - Clears current input allowing user to start again. With a signature, clears any captured 'ink' from the display. With an Input object, clears all entered input.
cancel - With a signature, clears any captured 'ink' and terminates input.
delete - With an input object, deletes the last character.

x, y

Position of the top left corner of the object on the pad display.
Value can either be absolute position in pixels, or one of the strings:

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

Either, an integer specifying button width in pixels or an ObjectOptions object.
If the given width is less than the width of the text (in the current font), it is ignored.
(Optional)

Return values
The added Object if success or null if there is some error.