Windows
The Windows tab is the visual designer: you draw each screen of the application by placing controls on a window, then set them up in the inspector, on the right.
Creating a window
The Windows list, at the top left, shows the project's windows and the number of controls in each. The + button adds one; the bin deletes the selected one.
With no control selected, the inspector sets up the window itself:
| Setting | Purpose |
|---|---|
| Name | Name of the window in the project, prefixed with FEN_ (FEN_Principale) |
| Title | Text of the title bar (translatable) |
| Size | Width × height, 800 × 560 by default; the canvas corner handle changes it too |
| Background | Background color; empty: the theme's |
| Resizable | The user can enlarge the window |
| Startup window | The window opened when the application starts |
A window has two events: Opening and Closing (see Interactions).
Placing controls
Pick a control in the Palette, then click on the window where you want it; a double-click in the palette places it at the top left. Then:
- drag it to move it; Snap to grid (8 px) aligns the controls;
- pull its handles to resize it;
- move it with the keyboard using the arrows (1 px) or Shift+arrows (8 px);
- Ctrl+D duplicates it, Del deletes it;
- "Bring forward" and "Send backward" set the stacking order.
The tag of the selected control shows its name, the number of events in use (⚡) and whether it is bound to data (⛁).
Canvas zoom
By default, the canvas is in Fit mode: the whole window fits in the visible area, without going beyond 100%. It thus adapts to the size of your screen. The canvas toolbar controls set the zoom, from 25 to 400%:
- − and + (or Ctrl − and Ctrl +, or Ctrl + mouse wheel);
- the displayed percentage: a click goes back to 100%;
- Fit (Ctrl 0): back to fit mode.
The zoom only changes the display: positions and sizes stay in real pixels, the snap grid keeps its 8 px step, and the resize handles keep the same size on screen.
The 18 controls
Each control gets a prefixed name, which tells its kind and is used in code: SAI_Nom, BTN_Valider…
| Control | Prefix | Events | To… |
|---|---|---|---|
| Label | LIB_ | Click | display a text |
| Button | BTN_ | Click | trigger an action |
| Text field | SAI_ | Change, Validation (Enter) | type a single line of text; password option |
| Text area | ZTX_ | Change | type text over several lines |
| Number field | NUM_ | Change | type a number, between a minimum and a maximum |
| Check box | CAC_ | Change | yes or no |
| Switch | INT_ | Change | on or off |
| Selector (radio buttons) | SEL_ | Selection | one choice among a few, all visible |
| Drop-down list | COMBO_ | Selection | one choice in a folded list |
| List | LST_ | Selection, Double-click | a list of items |
| Table | TABLE_ | Selection, Double-click | records in rows and columns |
| Image | IMG_ | Click | an image from the ressources folder |
| Slider | CUR_ | Change | a value chosen by dragging |
| Progress bar | JAUGE_ | — | the progress of a task |
| Date field | DATE_ | Change | a date (YYYY-MM-DD) |
| Link | LIEN_ | Click | open a web address |
| Group | GRP_ | — | frame controls under a title |
| Separator | SEP_ | — | a dividing line |
The control inspector
The inspector is organised in sections:
- Position and size: X, Y, width, height, and the anchors (see below).
- Content: what the control displays, depending on its kind:
- the text of a label, button, check box, link or group;
- the initial value and the placeholder of a field;
- the items of a list or selector, one per line;
- the columns of a table, as
title ; field, one per line; - the minimum, maximum and step of a number field, slider or progress bar;
- the address of a link;
- the file of an image;
- the tooltip, for every control.
- Behavior:
- Visible, Enabled;
- Password (text field);
- Read-only (fields and text area).
- Data: the entity and the field the control is bound to; for a table, its source. See below.
- Style:
- text color and background color (empty: the theme's);
- size, bold, italic;
- alignment.
- Events: the control's events; a click opens the Interactions tab on the chosen event.
Anchors
Anchors say how a control follows the window when it is resized:
| Horizontal anchor | Effect |
|---|---|
| Fixed | stays where it is |
| Right | stays stuck to the right edge |
| Stretch | widens with the window |
| Center | stays centered |
The vertical anchor works the same way, with Bottom instead of Right.
Binding a control to data
A label, text field, text area, number field, check box, switch, slider or date field can be bound to a field of an entity (see Data). The control then shows the current record, and the actions "New record", "Save the record", "Load a record"… fill it or read it without a line of code.
A table has a source (an entity) and title ; field columns: the "Fill a table" action shows the records in it, with an optional condition.
Phone preview
The phone button in the canvas toolbar shows the window as it will appear on a mobile, on a screen 390 points wide. A window wider than the screen is rearranged: its controls stack in a single column, in reading order, from top to bottom and left to right.
If this order does not suit you, select a control in the preview and move it with the toolbar arrows. The order set by hand is saved with the window; "Restore automatic reading order" goes back to the computed order.