# Touch

Touch the object set with the trigger to run the operation.

##### Block

##### Text

onClick($GraphicObject, ()=>{
1 2
})

1: Operation

2: Target object

Note: For information about the objects which is available in Target Object, refer to the following.

Supported Objects

## Operation

[Click]

[Press]

[Release]

[Hold]

[DoubleClick]

### [Click]

The operation is triggered when you touch the object then release.

##### Block

##### Text

onClick($GraphicObject.Rectangle1, ()=>{

});

Note:

- On the display unit, if you touch the object and slide your finger outside the object area without releasing your finger, the click is canceled.
- The Touch trigger (Click) is NOT activated in the following cases.

- Object does not display anymore due to a screen or content change.
- The interlock function is enabled on the object.
- The user logs out.
- Project file is transferred.
- Run time is shutdown.
- Run time is restarted.
- The Windows active window changes from the run-time application to a different application.

### [Press]

The operation is triggered when you press the object.

##### Block

##### Text

onPress($GraphicObject.Rectangle1, ()=>{
});

1: EnableDelay

After the object is pressed for the defined amount of time, the operation is run.

##### Block

Select the check box to set a delay time.

##### Text

To set a delay time (for example, 10*100 ms) in Text mode, use

onPressWithDelay($GraphicObject.Rectangle1, 10, ()=>{

});

#### Timing Chart

Example 1 | : Operation is triggered
Example 2 | : Operation is triggered : Delay Time
Example 3 | : Operation is triggered : Operation is NOT triggered : Delay Time

### [Release]

The operation is triggered when you release the object.

##### Block

##### Text

onRelease($GraphicObject.Rectangle1, () => {
});

1: EnableDelay

After the object is released and the specified time elapses, the operation is run.

##### Block

Select the check box to set a delay time.

##### Text

To set a delay time (for example, 10*100 ms) in Text mode, use

onReleaseWithDelay($GraphicObject.Rectangle1, 10, () => {
});

WARNING
TRIGGER BEHAVIOR When designing [Release] trigger, take into account that the [Release] trigger is also activated when the target object is no longer touchable. Failure to follow these instructions can result in death, serious injury, or equipment damage.

Note: The [Release] trigger is also activated in the following cases.

- The target object is no longer touchable due to screen/content display change
- The target object's interlock is enabled
- User is logged out
- Project file transfer
- Runtime shutdown by Runtime Application Operation (Shutdown)
- Runtime reboot by Runtime Application Operation (Reboot)
- Application window is no longer in focus

#### Timing Chart

Example 1 | : Operation is triggered
Example 2 | : Operation is triggered : Delay Time
Example 3 | : Operation is triggered : Delay Time

Note: If both [Press] and [Release] triggers are specified on the same object, and if the object is released before the [Press] delay time elapses, the [Release] trigger is executed but not the [Press] trigger.

: Operation is triggered by [Release] trigger

: Operation is NOT triggered by [Press] trigger

: [Press] Delay Time

### [Hold]

While you continue touching the object, the operation is repeatedly triggered for the specified duration. The maximum value that you can set for the [Duration] is 30 seconds.

##### Block

##### Text

onHold($GraphicObject.Rectangle1, 1000, ()=>{
})

1: EnableDelay

After the object is pressed for the specified amount of time, the operation is run.

##### Block

Select the check box to set a delay time.

##### Text

To set a delay time (for example, 10*100 ms) in Text mode, use

onHoldWithDelay($GraphicObject.Rectangle1, 1000, 10, () => {
});

#### Timing Chart

Example 1 | : Operation is triggered : Hold Time
Example 2 | : Operation is triggered : Delay Time : Hold Time

### [DoubleClick]

The operation is triggered when you double-click the object.

##### Block

##### Text

onDoubleClick($GraphicObject.Rectangle1, ()=>{

});

## Supported Objects

Shapes | Supported
Parts | All parts are supported, except for the following. Alarm Summary Ingredient Viewer Picture Display Web Browser Hardware Configuration File Manager
Predefined Images | Supported
Layout Objects | Not Supported
Grouped Object | Not Supported
Screens / Contents | Not Supported

## Touch Area

The touch area is the area of the width and height that is shown when the object is selected.

In the figure below, the area in red is the touch area.