Scale Method (WINDOW)
9.3A, PLBCMP GUI Only
The Scale method processes all of the GUI objects linked to a WINDOW object and scales each GUI object for the top, left, height, width, and font size properties relative to the original settings saved when the GUI object was created. The method uses the following format:
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A WINDOW object that is accessed.
return
Optional. A Numeric Variable that indicates the success or failure of the method.
height
Optional. A decimal number or Numeric Variable that gives the scaling factor for the height and top properties of each GUI object on the WINDOW object.
width
Optional. A decimal number or Numeric Variable that gives the scaling factor for the left and width properties of each GUI object on the WINDOW object.
fontsize
Optional. A decimal number or Numeric Variable that gives the scaling factor for the fontsize of each GUI object on the WINDOW object.
flags
Optional. A decimal number or Numeric Variable that provides a bit-mask value to control features of the method.
Flags Affected: EOS, OVER, ZERO
Note the following:
The ZERO flag is set if the result is zero.
The OVER flag is set if the result variable is too small to receive the result value without truncation.
The EOS flag is always set to FALSE.
If the {height} scale factor value is not specified, the scale factor is automatically
calculated using the current WINDOW height relative to the original WINDOW height.
Height Scale = CurrentHeight / OriginalHeight
If the {width} scale factor value is not specified, the
scale factor is automatically calculated using the current WINDOW width relative to the original WINDOW
width.
Width Scale = CurrentWidth / OriginalWidth
If the {fontsize} scale factor value is not specified, the scale factor used is the smaller scaling value determined from the height and width scale values.
The scale values for the height, width, and fontsize can be a FORM variable with up to two decimal points.
The {flags} bit-mask values are defined as follows:
|
Value |
Scale the WINDOW object and ... |
|
0x1 |
position to the original top left property settings. |
|
0x3 |
use the current top left property settings. |
|
0x4 |
center all ICON objects after scaling action. |
DIALOGs, ALERT dialogs, MENU objects, SUBMENU objects, POPUPMENU objects, and FLOATMENU objects cannot be scaled.
The WINDOW is not scaled.
This method is not supported by the PL/B Web Server.
See Also: Method Syntax, WINDOW Methods
![]() |