WindowOptions
(Engine-Level Function)
Description: |
Alters the options on a window after it has been opened. |
Returns: |
Nothing |
Usage: |
Script or Steady State |
Function Groups: |
Window |
Related to: |
MoveWindow | SizeWindow | Window | WindowClose |
Format: |
WindowOptions(Object, Option, OptValue); Or WindowOptions(Object, 15, Width, Height); |
Parameters: |
|
Object |
Required. Any expression that returns the object value of any module instance drawn in the window. |
Option |
Required. Any numeric expression that specifies which option for the window to alter. Step options 1-4 should be used by advanced users only as these should be used only by VScrollbar and HScrollbar.Option | Attribute to alter |
---|
0 | Visibility of the window | 1 | Horizontal scroll line step size | 2 | Horizontal scroll page step size | 3 | Vertical scroll line step size | 4 | Vertical scroll page step size | 5 | Set Horizontal Scroll position. Has no effect in an Anywhere client. | 6 | Set Vertical Scroll position | 7 | Locator reporting rate from the VIC is accelerated. Typically this would be used when fast, dynamic feedback of mouse movement from the VIC is required for a rapid, interactive response. CAUTION: Unnecessary use of this option can seriously degrade the VTScada window update rate on the VIC. Not supported by the Anywhere client. | 8 | Locator reporting rate from the VIC is returned to normal. Locator position reports are only sent when the VIC considers them significant. This is the default mode of operation. Not supported by the Anywhere client. | 9 | Sets the level of alpha-blending (window translucency) of the window. OptValue determines the level of alpha-blending from 0 (completely transparent) to 255 (completely opaque). An OptValue of 128 would give 50 percent translucency. Not supported by the Anywhere client. | 10 | Set background color of tooltips. Must be provided as a palette color. You may set the option value to -1 to use default colors or -2 (the default) to use parent window settings. Will work only when visual themes are disabled in Windows. Not supported if running in Windows 7 or later. Not supported by the Anywhere client. | 11 | Set tooltips text color. Must be provided as a palette color. You may set the option value to -1 to use default colors or -2 (the default) to use parent window settings. Will work only when visual themes are disabled in Windows. Not supported if running in Windows 7 or later. Not supported by the Anywhere client. | 12 | Not supported if running in Windows 7 or later. Set tooltips show delay. Will work only when visual themes are disabled in Windows. Not supported by the Anywhere client. | 13 | Set tooltips show duration. This value is limited by the operating system to less than 33 seconds. Will work only when visual themes are disabled in Windows. Not supported if running in Windows 7 or later. Not supported by the Anywhere client. | 14 | Set tooltips neighbor re-show delay. Will work only when visual themes are disabled in Windows. Not supported if running in Windows 7 or later. Not supported by the Anywhere client. | 15 | Sets the minimum window width and height, using two option value parameters instead of one, e.g. WindowOptions(Self(), 15, Width, Height); | 16 | The Source window will redirect its mouse wheel messages to the Destination window. A source window can only have one redirect at a given time. In an Anywhere Client with touch screen, this will redirect vertical panning. For advanced users only. | 17 | Reserved. | 18 | Turn alignment cue drawing and behavior on or off. Not supported by the Anywhere client. | 19 | Set the color of the alignment snaps. Not supported by the Anywhere client. | 20 | Set the color of the distance snaps. Not supported by the Anywhere client. | 21 | Set the color of the spacing snaps. Not supported by the Anywhere client. | 22 | Set the color of the sweep area border. Not supported by the Anywhere client. | 23 | Set the color of the sweep area fill. Not supported by the Anywhere client. | 24 | Dark color of the bounding box edges in a selection. Not supported by the Anywhere client. | 25 | Handle inner fill color. Not supported by the Anywhere client. | 26 | Snap sensitivity in pixels. Not supported by the Anywhere client. | 27 | Drag sensitivity in pixels. Not supported by the Anywhere client. | 28 | X translation of the window. Not supported by the Anywhere client. | 29 | Y translation of the window. Not supported by the Anywhere client. | 30 | Set the size of distance snaps. Not supported by the Anywhere client. | 31 | Set the background color of the window. | 32 | In an Anywhere Client with touch screen, this will redirect horizontal panning. For advanced users only. |
|
OptValue |
Required. Any numeric expression that specifies the value to set the given option to. For an Option of 0 (visibility), OptValue produces the following effects:OptValue | Effect |
---|
0 | Activate and display in current position | 1 | Bring to foreground without activating | 2 | Maximize and activate | 3 | Minimize. Deactivate if active | 4 | Hide | 5 | Similar to OptValue 0, but the graphic editing window in-use is not modified. |
|
Width |
Required. Used when the Option value is 15. Sets the minimum window width |
Height |
Required. Must be present and valid when the Option value is 15. Sets the minimum window height. |
Comments: |
This statement will alter the attributes of the window as it is running. The values that the given options can be set to are from -32763 to 32763. When the option value is set to 15, the function requires four parameters, all of which must be valid. The last two set the minimum width and height |
Example:
If MatchKeys(2, "I");
[
WindowOptions(Self(), 0, 3);
]
If an "I" is pressed on the keyboard, the window that this module is running in will be minimized.
If ZButton(10, 50, 110, 80, "SetSize", 2, System.DefFont);
[
WindowOptions(Self(), 15, 200, 150);
]
If ZButton(10, 90, 110, 120, "ClearSize", 3, System.DefFont);
[
WindowOptions(Self(), 15, 0, 0);
]
Trihedral and VTScada are registered trade marks of Trihedral Engineering Limited
© Trihedral Engineering Limited 1983- 2024 All rights reserved.