events
Type: Array of JSON objects
Required: No
"events": [
{
"name": ".onMyCustomEvent",
"displayName": ".onMyCustomEvent",
"visible": true,
"displayPriority": 30,
"category": "Control",
"description": "This is a sample for a framework control event.",
"heritable": true
"allowsPreventDefault": false
}
]
This property defines events that can be configured through the Engineering and are triggered in this framework control. An event is used to notify the Engineering that a specific event has occurred in the control. The HMI developer can respond to this event accordingly in the Engineering. Triggering of an event is implemented in Source.js.
An event object contains the following properties:
name
{String}: Internal name of the event.displayName
{String}: Name of the function that is displayed in the Engineering.visible
{Boolean}: Visibility of the event. If "visible
" is set to "false
", the event is not displayed in the Engineering.displayPriority
{number}, not required: The priority determines the order in which the various events are displayed within the category.- Values = 10 correspond to frequently used events such as ".
onPressed
". - Values = 15 correspond to standard events such as ".
onClick
" or "onRightClick
". - Values = 50 correspond to rarely used events such as ".
onMouseUp
". - No value assigned: The event is collapsed by default and has to be expanded using the arrow.
category
{String}: The category determines under which category the event is listed in the Engineering. Existing categories such as "Operator
" can be used, or new category names can be assigned.description
{String}: Optional description of the event, which is displayed as a tooltip on mouseover in the Engineering.heritable
{Boolean}: This property defines whether the event is to be passed on to derived classes. By default, this value is "true
", so that the event is inherited.allowsPreventDefault
{Boolean}, not required: This property specifies that a user can explicitly select preventDefault. See also Events
The event configured above is displayed in the Engineering as follows: