Edit Mode versus Run Mode
When the application is in edit mode (Idea Studio), widgets should respond to user clicks differently than when the application is in run mode.
You can determine which mode the application is in by querying, ParentWindow()\Editing. VTScada will return a value of TRUE or FALSE depending on the mode. You can then code your widget to examine the \Editing value before responding to a user's action.
An example can be seen with Set Analog Value Hotboxes. When in Edit mode, these display as a yellow rectangle, but when in run mode, they are invisible until the user hovers the mouse pointer over them. You can emulate this behavior by adding a GUIRectangle to your widget and coding its Visibility parameter to examine the current value of ParentWindow()\Editing.
{***** Display the hotbox when over top, or when editing *****} \HotBox(0, 0, 30, 100, 0, Invalid, Color); GUIRectangle(0, 30, 100, 0 { Also sets module ref box }, 1, 1, 1, 1, 1, 0, 0, ParentWindow()\Editing ? 1 : 0, 0, 0, 0, 0, -1, PickValid(Color, 14));