<< 点击显示目录 >> 主页 mappView帮助助手 > mapp View帮助信息 > Widgets > System > LanguageSelector > Actions and events |
The following section describes the possible actions and events for the widget.
Name |
Description |
Arguments |
SetImagePath |
Defines the path to the language icons. |
•imagePath: DirectoryPath |
SetSelectedIndex |
Changes the selected element using its index. |
•index: Integer |
SetSelectedValue |
Sets the selected entry based on this value. |
•value: String |
SetVisible |
Controls the visibility of the widget. |
•value: Boolean |
SetEnable |
Controls the usability of the widget. |
•value: Boolean |
SetStyle |
Sets a predefined style for the widget. |
•value: StyleReference |
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". |
|
Open |
Opens the "LanguageSelector" widget list. NOTE: When creating an event binding, action "Open" can be used with any widget or value change event. |
|
Close |
Closes the "LanguageSelector" widget list. NOTE: When creating an event binding, action "Close" can be used with any widget or value change event. |
|
Toggle |
Opens or closes the "LanguageSelector" widget list. NOTE: When creating an event binding, action "Toggle" should be used with the value change event. |
|
Focus |
Sets the focus to the widget when keyboard operation is enabled. |
|
•Examples
•Action "Open"/"Close"
<EventBinding>
<Source xsi:type="widgets.brease.Button.Event" contentRefId="ManTestContent" widgetRefId="Button0" event="Click" />
<EventHandler>
<Action>
<Target xsi:type="widgets.brease.LanguageSelector.Action" contentRefId="ManTestContent" widgetRefId="LanguageSelector0" >
<Method xsi:type="widgets.brease.LanguageSelector.Action.Open" />
</Target>
</Action>
</EventHandler>
</EventBinding>
•Action "Toggle"
<EventBinding>
<Source xsi:type="widgets.brease.Button.Event" contentRefId="ManTestContent" widgetRefId="Button0" event="ValueChanged" />
<EventHandler>
<Action>
<Target xsi:type="widgets.brease.LanguageSelector.Action" contentRefId="ManTestContent" widgetRefId="LanguageSelector0" >
<Method xsi:type="widgets.brease.LanguageSelector.Action.Toggle" />
</Target>
</Action>
</EventHandler>
</EventBinding>
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 |
GetSelectedIndex |
This action returns the currently selected index. |
•result: Integer |
GetSelectedValue |
This action returns the currently selected value selectedValue. |
•result: String |
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). |
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. |
SelectedIndexChanged |
Triggered when the selectedIndex (i.e. which element is selected) changes due to an interaction, a binding or an action (setter). |
•selectedIndex: Integer •selectedValue: String |
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. |
ToggleStateChanged |
Triggered when the "LanguageSelector" widget list is opened or closed. |
•newValue: Boolean "newValue" returns the new value of widget "LanguageSelector". If true, the list is shown; if false, it is not shown. |
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. |
|