Actions and events

<< 点击显示目录 >>

主页  mappView帮助助手 > mapp View帮助信息 > Widgets  > Buttons  > CheckBox  >

Actions and events

The following section describes the possible actions and events for the widget.

Actions

Name

Description

Arguments

RemoveMouseDownText

Removes an existing text that is displayed when in its pressed state.

 

RemoveText

Removes an existing text from a widget.

 

SetMouseDownText

Adds a text to the widget that is displayed when in its pressed state.

Text keys from the text system (e.g. "$IAT/TextID") or texts put together as a string using operands (e.g. "=myStringOperand") can be used.

text: String

keepKey: Boolean

The text key is not removed if "keepKey" is true.

SetText

Adds a text to the widget.

Text keys from the text system (e.g. "$IAT/TextID") or texts put together as a string using operands (e.g. "=myStringOperand") can be used.

text: String

keepKey: Boolean

The text key is not removed if "keepKey" is true.

SetValue

Sets the value of the widget.

To ensure that the value is set correctly on the widget, action SetValueBool or SetValueInteger must be used. This ensures that the desired value is interpreted correctly on the widget.

value: Integer

The widget is selected if "value" is 1. Otherwise, the widget is not selected.

SetVisible

Controls the visibility of the widget.

value: Boolean

Visible if the value is true. Otherwise, invisible.

SetEnable

Controls the usability of the widget.

value: Boolean

Enabled if the value is true. Otherwise, disabled.

SetStyle

Sets a predefined style for the widget.

value: StyleReference

SetValueBool

Sets the value of the widget as a "Boolean" value.

value: Boolean

If true, the widget is pressed; if false, the widget is not pressed.

SetValueInteger

Sets the value of the widget to an "Integer" value.

value: Integer

The widget is pressed if "value" is 1. Otherwise, the widget is not pressed.

ShowTooltip

Mode "Tooltip" can be enabled using this action. When enabled, a tooltip indicator appears inside the widget. For this, a text must be configured in property "Tooltip". This text is displayed when the indicator is selected. Any other operation of a widget terminates mode "Tooltip".

 

Focus

Sets the focus to the widget when keyboard operation is enabled.

 

Table: Actions

Reading actions

To obtain the result of a reading action, an "operand" must be used. For more information, see here. For how the result can be used in the ResultHandler, see here.

Name

Description

Result

GetValueInteger

This action returns the current "value" value as an integer value.

1: The widget is selected.

All other values: The widget is not selected.

result: Integer

GetValueBool

This action returns the current "value" value as a Boolean" value.

true: The widget is selected.

false: The widget is not selected.

result: Boolean

Table: Reading actions

Events

Name

Description

Arguments

Click

Triggered when clicking on the widget.

origin: String

"origin" contains the ID of the widget that triggers the click event.

horizontalPos: String

horizontalPos contains the horizontal position of event "Click" in pixels (e.g. 10px starting from the viewport).

verticalPos: String

verticalPos contains the vertical position of the click event in pixels (e.g. 10px starting from viewport).

DisabledClick

Triggered when clicking on the disabled widget.

origin: String

"origin" contains the ID of the widget that triggers the click event.

hasPermission: Boolean

"hasPermission" defines whether the current user has the necessary rights to access it.

horizontalPos: String

horizontalPos contains the horizontal position of the DisabledClick event in pixels (e.g. 10px starting from viewport).

verticalPos: String

verticalPos contains the vertical position of the DisabledClick event in pixels (e.g. 10px starting from viewport).

DoubleClick

Triggered when double-clicking on the widget.

horizontalPos: String

horizontalPos contains the horizontal position of the DoubleClick event in pixels (e.g. 10px starting from viewport).

verticalPos: String

verticalPos contains the vertical position of the DoubleClick event in pixels (e.g. 10px starting from viewport).

MouseDown

Triggered when the widget is pressed.

horizontalPos: String

horizontalPos contains the horizontal position of the MouseDown event in pixels (e.g. 10px starting from viewport).

verticalPos: String

verticalPos contains the vertical position of the MouseDown event in pixels (e.g. 10px starting from viewport).

MouseUp

Triggered when the widget is released.

horizontalPos: String

horizontalPos contains the horizontal position of the MouseUp event in pixels (e.g. 10px starting from viewport).

verticalPos: String

verticalPos contains the vertical position of the MouseUp event in pixels (e.g. 10px starting from viewport).

EnableChanged

Triggered when the usability of the widget is changed. This can be changed using various options:

1) Using property enable (binding or via widget action SetEnable)

2) Using property permissionOperate

3) Using usability properties (enable, permissionOperate, OPC UA variable) of the surrounding container widget

4) Using a bound OPC UA variable with write permissions that have been changed.

value: Boolean

"value" defines the usability of the widget. If true is returned, the widget can be used; if false, it cannot be used.

VisibleChanged

Triggers when the visibility of the widget is changed. This can be changed using various options:

1) Using property visible (binding or via widget action SetVisible)

2) Using property permissionView

3) Using the visibility properties (visible, permissionView) of the surrounding container widget

value: Boolean

"value" defines the visibility of the widget. If true is returned, the widget is displayed; if false, it is not displayed.

ValueChanged

Triggered if the value of the value property changes via an interaction or actions "SetValue", "SetValueInteger" or "SetValueBool".

newValueBool: Boolean

Returns the new value of property value as "Boolean".

newValueInteger: Integer

Returns the new value of property value as "Integer".

newValue: Integer

To ensure that the value is returned correctly by the widget, argument "newValueBool" or "newValueInteger" must be used. This ensures that the desired value is interpreted correctly by the widget.

OnDragStart

Triggers when the user starts dragging the widget with the mouse or a finger.

Property "draggable" must be set to true for this.

widgetId: String

"widgetId" contains the ID of the widget that performed the drag operation.

contentId: String

"contentId" contains the ID of the piece of content whose widget performed the drag operation.

OnDragEnd

Triggers when the user has finished dragging the widget, i.e. when the widget is released with the mouse or a finger.

Property "draggable" must be set to true for this.

widgetId: String

"widgetId" contains the ID of the widget that performed the drag operation.

contentId: String

"contentId" contains the ID of the piece of content whose widget performed the drag operation.

OnDragEnter

Triggers when a dragged widget is moved over the target widget.

widgetId: String

"widgetId" contains the ID of the widget that performed the drag operation.

contentId: String

"contentId" contains the ID of the piece of content whose widget performed the drag operation.

OnDragLeave

Triggers when a dragged widget is dragged away from the target widget.

widgetId: String

"widgetId" contains the ID of the widget that performed the drag operation.

contentId: String

"contentId" contains the ID of the piece of content whose widget performed the drag operation.

OnDrop

Triggers when a dragged widget is released on the target widget. For the definition of drag-and-drop and an explanation of how these events can be used, see here.

widgetId: String

"widgetId" contains the ID of the widget that performed the drag operation.

contentId: String

"contentId" contains the ID of the piece of content whose widget performed the drag operation.

FocusIn

Triggered when a widget gets the focus.

 

FocusOut

Triggered when a widget loses focus.

 

Table: Events