<< 点击显示目录 >> 主页 mappView帮助助手 > mapp View帮助信息 > Widgets > Motion > MotionPad > Actions and events |
The following section describes the possible actions and events for the widget.
Name |
Description |
Arguments |
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 |
Open |
Opens the file that is transferred as an argument. |
•filePath: FilePath |
OpenFileExplorer |
Opens the file browser to select, edit or delete files, for example. |
|
Save |
Saves the file that is currently open. |
|
SaveAs |
"SaveAs" opens the file browser and saves the file after a name is entered. |
|
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". |
|
New |
Creates a new, empty file and deletes the content of the editor. |
|
AppendText |
Adds the text that is transferred as an argument to a new line at the end of the file. |
•value: String |
Run |
Executes the currently loaded program in the axis group. |
|
Stop |
Stops execution of the currently running program. |
|
Restart |
This action can be used to continue execution of the program after it has been stopped. The program is started in simulation up to the line where the program was last stopped; it then resumes normal execution from this position. |
|
Pause |
Pauses execution of the currently running program. It is stopped after the line that is currently running. |
|
Resume |
Resumes program execution after a restart or pause. |
|
StepOver |
This action executes the current line and stops in the next line. If a function is called, the debugger is not stopped within the function. |
|
Focus |
Sets the focus to the widget when keyboard operation is enabled. |
|
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 |
GetSelectedText |
This action returns the currently marked text. |
•result: String |
GetModifiedState |
This action returns information about whether the file is already saved with its changes or not. true: The file has been modified but not yet saved. false: The file is saved. |
•result: Boolean |
GetCurrentFileOpened |
This action provides the path to the opened file. If the file is new, an empty string is returned. |
•result: FilePath |
GetPlcOpenState |
Returns information about the current state of the axis group. For more information, see data type "PlcOpenGroupState". |
•result: PlcOpenGroupState |
GetCurrentRunningProgram |
Returns the file path of the running program. If no program is running, an empty string is returned. |
•result: FilePath |
GetCurrentRunningLine |
Returns the current line being executed by the program. If no program is running, 0 is returned. |
•result: UInteger |
GetProgramPhase |
Returns the current phase of the program. For more information, see data type "McProgramPhase". |
•result: McProgramPhase |
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). |
FileModified |
Triggered when a user edits the file for the first time. |
|
FileSaved |
Triggered when the file is saved. |
|
FileOpened |
Triggered when the file is opened. |
•filePath: FilePath "filePath" returns the path of the opened file. If the file is new, an empty string is returned as an argument. |
OnError |
Triggered if a communication error with the mapp component occurs. |
•result: Integer "result" returns the error number of the mapp component. |
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. |
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. |
PlcOpenStateChanged |
Triggered when the state of the axis group changes. |
•value: PlcOpenGroupState "value" returns the current state of the axes as a number. For a detailed description, see "Data type". |
ProgramPhaseChanged |
Triggered when the status (phase) of the program changes. |
•value: McProgramPhase "value" returns the current phase of the program as a number. For a detailed description, see "Data type". |
CurrentRunningLineChanged |
Triggered when the current line of the running program has changed. |
•value: UInteger "value" returns the number of the line currently being executed in the program. |
CurrentRunningProgramChanged |
Triggered when the program currently being executed has changed. |
•value: FilePath "value" returns the path of the new file being executed. |
FocusIn |
Triggered when a widget gets the focus. |
|
FocusOut |
Triggered when a widget loses focus. |
|