Forms

Form Files and Formats

Form Object

Root Container

Containers and Widgets

Layout Rules

Customizing the Form’s Look

Displaying the Form

Form Files and Formats

A form file is a file used for input and interaction with a 4GL program.

.fm2 is a modern and advanced form file format that extends the opportunities of legacy .per form and modernizes its look. Also, .fm2 format is easy to operate with, as it basically contains an XML code.

Using Lycia VS Code Extension, you can start your work with .per or .4fm form files, as we have tools to convert them into .fm2 format. Read more about form conversion here: Converting Form Files.

 

Return to top

Form Object

The Form Object is the abstract container where all the contents of the form are stored:

It has its own properties, which you can see in the Properties view after you click the Form Object:

The Form Object’s XML code:

<form xmlns="http://namespaces.querix.com/2015/fglForms">

...

</form>

Note: Actions can be configured in the Form Object's properties: to do that, select the Form Object and find the Actions property in the Properties view.

Return to top

Root Container

A new form is created without any container inside:

When you drag-and-drop the first container from the Palette to the Design Area and place it within the Form Object, the Form Object’s window, displayed in the Design Area, expands:

That first container will become a Root Container - the seat for all other containers and widgets of the form.

The XML code of a GridPanel as a Root Container will be the following:

<form.rootContainer>

<GridPanel visible="true" preferredSize="," identifier="gp1">

</GridPanel>

</form.rootContainer>

 

Return to top

Containers and Widgets

A container is a form element, within which you can place other elements (containers and widgets).

A widget is a form element to serve as a field for the display and input of data.

To learn what containers and widgets to pick for specific tasks, proceed to the following chapters:

 

Return to top

Layout Rules

There are certain rules of size and alignment of form properties. Follow them to ensure the form will look exactly as you need it to:

Exceptions:

 

Return to top

Customizing the Form’s Look

The Form Builder is a tool for modifying the form’s layout. You can add more details to your form’s look with themes, CSS styles, images, scripts, etc. For more detail, refer to the following pages:

Note: Currently, we recommend to use CSS to customize visual properties, and use Qxthemes for non-visual (for example, for adding report viewers or wrappers a.k.a. plugins).

 

Return to top

Displaying the Form

To get the form displayed at runtime, use the OPEN WINDOW ... WITH FORM statement. See the code example below:

OPEN WINDOW my_form AT 1,1 WITH FORM "form_file"

ATTRIBUTE (BORDER)

Here,

my_form stands for the variable of the WINDOW data type, defined in the MAIN block;

form_file is the name of the form file to be displayed in a newly opened window.

Note: When you specify form file name (form_file), be careful with its case. UNIX is case-sensitive, so it will treat forms, which names come in different cases, as separate files.

 

Return to top

 

Contact Us

Privacy Policy

Copyright © 2025 Querix, (UK) Ltd.