In what order are events triggered?

In what order are events triggered?

The order in which touch events trigger depends on the events configured for a screen and its graphic elements. When configuring multiple graphic elements with touch events, the events trigger as follows:
Screen events trigger before graphic element events
A screen can have an event and also contain a graphic element with its own event. Touching the screen triggers the event. Touching the graphic element triggers the event of the screen and the event of the graphic element. In this example, there is an event associated with the screen, and an event associated with the button.
ViewDesEventExample0
Press Event
Triggered action
1
Press here to trigger the event associated with the screen.
2
Press here to trigger the event associated with the screen and then trigger the event associated with the button.
An event of a graphic element triggers even when the graphic element overlaps another
A graphic element may lie partially over another graphic element on the screen. Each graphic element can have its own event. Trigger the event of the graphic element by touching the graphic element. This is true even when touching the portion of a graphic element that is on top of the other. In this example, there is a unique event associated with each button. Part of Button B lies on top of Button A.
ViewDesEventExample1
Press Event
Triggered action
1
Press here to trigger the event associated with Button A.
2
Press here to trigger the event associated with Button B.
3
Press here to trigger the event associated with Button B.
Graphic elements with events are not affected by an overlay element that does not have an event
A graphic element with a touch event may lie underneath an overlay element. If the overlay element does not have an event, the event of the graphic element triggers even when pressing the portion of the element under the overlay. In this example, there is an event associated with Button A. However, there is no event associated for the rectangle overlay lying on top of a portion of Button A.
ViewDesEventExample2
Press Event
Triggered action
1
Press here to trigger the event associated with Button A.
2
Press here to trigger the event associated with Button A.
3
Press here to trigger no event.
An event of a group and the events of the graphic elements in the group are not affected by an overlay element that does not have an event
When a group with a touch event contains graphic elements with touch events, touching the group triggers the event of the group. Pressing a graphic element in the group triggers the event of the group, and the event of the graphic element. An overlay element that does not have an event does not affect triggered events. In this example, there is an event associated with the group consisting of Button A and Button B, an event associated with Button A, and an event associated with Button B (positioned partially over Button A). There is no event associated with the rectangle overlay.
ViewDesEventExample4
Press Event
Triggered action
1
Press here to trigger the event associated with the group and then trigger the event associated with Button A.
2
Press here to trigger the event associated with the group and then trigger the event associated with Button B.
3
Press here to trigger the event associated with the group and then trigger the event associated with Button B.
4
Press here to trigger the event associated with the group.
An event of a group of line art is triggered regardless where the group is pressed
If a group of line art contains a touch event, it triggers the event of the group regardless of where the group is pressed. In this example, there is an event associated with the group that contains the line art.
ViewDesEventExample3
Press Event
Triggered action
1
Press here to trigger the event associated with the group.
2
Press here to trigger the event associated with the group.
3
Press here to trigger the event associated with the group.
When a group of line art with an event contains a numeric or text input graphic element, the event of the group triggers before the virtual numeric keypad or virtual standard keyboard opens
If a group contains line art and an input graphic element, the event of the group triggers regardless of where the group is touched. If pressing the input graphic element, it triggers the event of the group and opens the virtual numeric keypad or virtual standard keyboard. If a group contains line art and an input graphic element, the event of the group triggers regardless of where the group is touched. Pressing the input graphic element triggers the event of the group and opens the virtual numeric keypad or virtual standard keyboard. In this example, there is an event associated with the group. The group contains line art and a text input graphic element.
Event Example 6
Press Event
Triggered action
1
Press here to trigger the event associated with the group.
2
Press here to trigger the event associated with the group.
3
Press here to trigger the event associated with the group and then open the virtual numeric keypad or virtual standard keyboard to enable input.
When a group of line art with an event is placed on top of a numeric or text input graphic element that is not part of the group, the event of the group is triggered, but the virtual numeric keypad or keyboard does not open
If a group lies on top of an input graphic element, touching the group triggers the event of the group. Pressing the input graphic element does not open a virtual numeric keypad or virtual standard keyboard.
In this example, a group that has an event associated lies on top of an input graphic element that is not part of the group.
ViewDesEventExample7
Press Event
Triggered action
1
Press here to trigger the event associated with the group.
2
Press here to trigger the event associated with the group.
3
Press here to trigger the event associated with the group. The virtual numeric keypad or the virtual standard keyboard does not open.
An event of a group and the events of the graphic elements in the group are not triggered if the event of an overlay graphic element is triggered
For example, a group with a touch event contains two graphic elements with their own touch events. A graphic element with its own touch event lies on top of the group. Touching a graphic element not under the overlay element triggers the event of the group and the event of the graphic element. Pressing a graphic element under the overlay element triggers only the event of the overlay element. In this example, there is an event associated with the group. The two buttons in the group each have a unique event associated with them. There is also an event associated with an overlay element.
ViewDesEventExample5
Press Event
Triggered action
1
Press here to trigger the event associated with the group.
2
Press here to trigger the event associated with the group and then trigger the event associated with Button A.
3
Press here to trigger the event associated with the rectangle overlay.
When a group has a release event and the graphic elements in the group have press and release events, the event of the press event is triggered before the release events of the group and its graphic elements
For example, a group with a
Touch Release
event contains a button with its own both press and release events. The events of the button change the state of the button upon press and release. Pressing the button triggers the press event of the button. The button shows the press state. Releasing the button triggers the
Touch Release
event of the group, and the
Touch Release
event of the button showing the release state. In this example, a group contains only a button. There is a Touch Release event associated with the group. A Touch Press event and a Touch Release event are associated with the button.
ViewDesEventExample8
Press Event
Triggered action
1
Press the button to trigger the touch press event associated with the button. Release the button to trigger the Touch Release event associated with the group, and then trigger the touch release event associated with the button.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.