Button

Button

A class of built-in objects that correspond to button controls placed on the Virtual Ticket, Job Manager, or Digital Storage Manager form in which the MetaScript is being executed.

Core object

Created by

Button objects are predefined MetaScript objects, and can be accessed using one of the form control accessor methods of the global Form object. These methods include Form.createControlIterator, Form.getControlById, and Form.getControls.

Description

Button objects are designed to allow registration of event listeners for buttons located on form in which the MetaScript is being executed, and also to allow access to the properties of these buttons.

Form control events are fired as a result of user interaction with form controls (for example, in response to button clicks). Listeners may be registered for these events; an event listener is a particular function that executes each time a specific type of Event is fired by the system. Any number of listeners may be created for a given event type and one function may be a listener for several distinct events. The order in which event listeners are executed is not guaranteed.

To add an event listener for form control events, use the addEventListener method of the appropriate form control object (for example, Button.addEventListener for buttons).

Property Summary

 

Property

Description

disabled

A boolean property that sets whether the button is disabled (grayed and available for user clicks).

id

A read-only property that contains the unique alphanumeric identifier of the button.

isDisabled

A read-only property that indicates whether the button is disabled.

isVisible

A read-only property that indicates whether the button is visible.

label

A property that contains the text label of the button and allows this label to be set.

Method Summary

 

Method

Description

addEventListener

Adds a specified event listener for the specified event type.

removeEventListener

Removes an event listener added by addEventListener.

toString

Returns a string representation of the button object.


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.