Skip to content
Private alpha
Documentation — Windows

Documentation

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:

SettingPurpose
NameName of the window in the project, prefixed with FEN_ (FEN_Principale)
TitleText of the title bar (translatable)
SizeWidth × height, 800 × 560 by default; the canvas corner handle changes it too
BackgroundBackground color; empty: the theme's
ResizableThe user can enlarge the window
Startup windowThe 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…

ControlPrefixEventsTo…
LabelLIB_Clickdisplay a text
ButtonBTN_Clicktrigger an action
Text fieldSAI_Change, Validation (Enter)type a single line of text; password option
Text areaZTX_Changetype text over several lines
Number fieldNUM_Changetype a number, between a minimum and a maximum
Check boxCAC_Changeyes or no
SwitchINT_Changeon or off
Selector (radio buttons)SEL_Selectionone choice among a few, all visible
Drop-down listCOMBO_Selectionone choice in a folded list
ListLST_Selection, Double-clicka list of items
TableTABLE_Selection, Double-clickrecords in rows and columns
ImageIMG_Clickan image from the ressources folder
SliderCUR_Changea value chosen by dragging
Progress barJAUGE_—the progress of a task
Date fieldDATE_Changea date (YYYY-MM-DD)
LinkLIEN_Clickopen a web address
GroupGRP_—frame controls under a title
SeparatorSEP_—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 anchorEffect
Fixedstays where it is
Rightstays stuck to the right edge
Stretchwidens with the window
Centerstays 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.