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:

 

[label]

{object}.Scale

[GIVING {return}] USING [*Height=]{height}][:

 

 

*Width={width},][*FontSize={fontsize}][:

 

 

*Flags={flags}]

 

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:

  1. The ZERO flag is set if the result is zero.

  2. The OVER flag is set if the result variable is too small to receive the result value without truncation.

  3. The EOS flag is always set to FALSE.

  4. 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

  5. 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

  6. 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.

  7. The scale values for the height, width, and fontsize can be a FORM variable with up to two decimal points.

  8. The {flags} bit-mask values are defined as follows:
     

  9. 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.

     

  10. DIALOGs, ALERT dialogs, MENU objects, SUBMENU objects, POPUPMENU objects, and FLOATMENU objects cannot be scaled.

  11. The WINDOW is not scaled.

  12. This method is not supported by the PL/B Web Server.

 

 

See Also: Method Syntax, WINDOW Methods

 



PL/B Language Reference RibbonShowContext Method (WINDOW) SetAsClient Method (WINDOW)