Events

Events are used to trigger actions at project level and can be associated to:

You can attach one or more actions to an event, so that they will be executed whenever the event occurs.

This example shows a JavaScript action activated by pressing a button.

OnClick / OnMouseClick

Triggers the event when the button/key is pressed and released quickly.

OnHold/OnMouseHold

Triggers the event when the button/key is pressed and held pressed for a certain time set as Hold Time in the widget properties. Actions programmed for this event will be executed only after the hold time has expired.

The default Hold Time is configured in Project properties but can be redefined for each button/key. See "Project properties".

Note: If Hold Time is set to -1 for the widget, the project Hold Time value will be used.

Autorepeat

Enables auto repeat for a press or hold event of button or key. Autorepeat Time is specified in the Project properties but can also be redefined for each button or key

OnWheel

Triggers the event when a wheel (for example a USB mouse wheel) value changes. A wheel usually is used to increase/decrease values in a text box or attached to a tag. 

OnActivate

Triggers the event when a page is loaded. The event starts before widgets in the page are initialized.

OnDataUpdate

Triggers the event when the tag value changes. The update moment depend on the time needed by the protocol to finish the update process. For example the OnDataUpdate event can be triggered or not, depending on whether data becomes available from protocol respectively after or before widgets being initialized for the first time. In particular, page change notifications are more likely to happen with slow protocols and remote clients.

Note: The value read during OnActivate can be the same obtained from a subsequent OnDataUpdate event, since OnDataUpdate notifications are sent asynchronously.