Form Layout
The Form Layout is a style applied to a GRID
that lets the Genero
Desktop Client display the content of the section, ignoring the per alignment
and so on. Simple fields are bound to their labels using the TITLE
attribute.
Example
The
GRID
section only contains the
fields:GRID (style="flayout")
{
[firstname ]
[lastname ]
[address ]
[ ]
[postcode ]
[city ]
}
END
The
ATTRIBUTES
section defines the
TITLE
s:ATTRIBUTES
EDIT firstname = FORMONLY.firstname, TITLE="&First Name:";
EDIT lastname = FORMONLY.lastname, TITLE="&Last Name:";
TEXTEDIT address = FORMONLY.address, TITLE="&Address:", stretch=y;
EDIT postcode = FORMONLY.postcode, TITLE="&ZipCode:", PICTURE="#####";
COMBOBOX city = FORMONLY.city, TITLE="&City:",
ITEMS=("Paris","Strasbourg","Erfurt");
The 4st style file specifies the form
layout:
<Style name="Grid.flayout">
<StyleAttribute name="layoutType" value="form" />
</Style>
A form will be created, associating fields and their title. The alignment of the titles depends on the platform; if the title contains "&", pressing ALT + the following letter will set the focus on the attached field.