ui.Form.open()

ui.Form.open() is used to open a form from a form file.

Syntax

variable.Open("form file" [, "form id"])

Parameters

form file

the name of the form file without the extension. Can be either a quoted character string or a character variable. Can include a relative path, if necessary.

form id

(optional) the form identifier

When you specify a form name, be careful with its case.

UNIX is case-sensitive, so it will treat forms which names come in different cases as separate files.

Usage and examples

ui.Form.open() is used with a variable of the FORM data type to open a form from a form file.

It initializes the FORM variable and allows a 4gl developer to use other methods for manipulating this form:

DEFINE f ui.Form

...

CALL f.Open("my_form", "f1")

ui.Form.open() is equivalent to the OPEN FORM statement:

OPEN FORM f1 FROM "my_form"

The program given below opens and displays a form using the corresponding ui methods:

MAIN

DEFINE w ui.Window,

       f ui.Form

CALL w.Open("w", 1, 1, 1, 1, "border")

CALL f.Open("ui.Form.open", "f1")

CALL f.Display()

CALL fgl_getkey()

END MAIN

Every 4gl program must include some user interactions.

If your 4gl program doesn't have any user interactions, it will be performed at runtime and close immediately - without visible actions (like opening windows or forms, etc.) except for console displays.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.