ui.Interface.setSize
Specify the initial size of the window container.
Syntax
ui.Interface.setSize(
h STRING,
w STRING )
- h is the height of the window container.
- w is the width of the window container.
- Default unit is form cells, can accept graphical units like
px, or%for screen ratio.
Usage
Call the ui.Interface.setSize() method at the beginning of the program, before
displaying any window/form and before starting any interactive instruction.
The parameters can be INTEGER or STRING values. By default, the
unit is the character grid cells, to be used with traditional
mode. For regular rendering, use the px unit to specify the height and width
in pixels, or use the % sign as unit, to represent a ratio of the desktop
screen.
When using the GDC front end with regular rendering mode, the
ui.Interface.setSize() method defines the initial size of the window container. This method has
no effect when using the GAS+browser or with a mobile device, since the web browser tab or device
screen size cannot be controlled. When stored
settings apply, the size is taken from the stored settings.
When using traditional mode for the rendering, the
ui.Interface.setSize() method defines the initial size of the area containing the
fixed windows created by OPEN WINDOW, as a replacement for the fgl_setsize() built-in
function.
Example
MAIN
CALL ui.Interface.setSize("30%","80%")
OPEN FORM f1 FROM "main_form"
DISPLAY FORM f1
...
END MAIN