List Box Builder
You can create new entity selection list boxes quickly with the List box builder. The new list box can be used immediately or it can be edited via the Form Editor.
The List box builder lets you create and fill entity selection list boxes in a few simple operations.
Using the List Box Builder
In the Form Editor toolbar, click on the List box builder icon:
The List box builder is displayed:
Select a table from the Table dropdown list:
Select the fields for the list box in the Fields area:
By default, all fields are selected. You can select or deselect fields individually or use Ctrl+click (Windows) or Cmd+click (macOS) to select or deselect them all at once.
You can change the order of the fields by dragging them and dropping them.
The expression to fill the list box's rows from the entity selection is prefilled:
This expression can be changed if necessary.
Clicking on the Copy button will copy the expression for loading all records into memory:
Click the the Build widget button to create the list box.
The final list box:
The 4D Form Editor uses shields to make viewing object properties easier. You can find them on the form toolbar:
This function works as follows: Each shield is associated with a property (for example, Views, which means the object “is in the current view”). When you activate a shield, 4D displays a small icon (shield) in the upper left of each object of the form where the property is applied.
To activate a shield, click the Shield icon from the toolbar until the desired shield is selected. You can also click on the right side of the button and select the type of shield to display directly in the associated menu:
If you don't want to display shields, select No Shields in the selection menu.
You can set which shields to display by default on the Forms Page of the application Preferences.
Here is a description of each type of shield:
|Icon||名||Is displayed ...|
|Object Method||For objects with an associated object method|
|Standard Action||For objects with an associated standard action|
|サイズ変更||For objects with at least one resizing property, indicates the combination of current properties|
|Entry Order||For enterable objects, indicates the number of entry order|
|Current View||For all objects in the current view|
|Filter||For enterable objects with an associated entry filter|
|ヘルプTips||For objects with an associated tip|
|Localized||For objects whose label comes from a reference (label beginning with “:”). The reference can be of the resource (STR#) or XLIFF type|
|No Shields||No shields appear|
The 4D Form Editor enables you to build complex forms by distributing form objects among separate views that can then be hidden or shown as needed.
For example, you can distribute objects according to type (fields, variables, static objects, etc.). Any type of form object, including subforms and plug-in areas, can be included in views.
There is no limit on the number of views per form. You can create as many different views as you need. Additionally, each view can be displayed, hidden, and/or locked.
View management is handled via the View palette.
Accessing the View palette
There are three ways to access the View palette:
Toolbar: Click on the Views icon in the Form Editor toolbar. (This icon appears gray when at least one object belongs to a view other than the default view.)
Default view only With additional views
Context menu (form or object): Right-click anywhere in the Form Editor or an object, and select Current View
The current view is indicated with a check mark (e.g., "Work Address" in the image above)
- Form menu: Click on the Form menu and select View List
Before you begin
Here are a few important things to know before you start working with views:
Context of use: Views are a purely graphic tool which can only be used in the Form Editor; you cannot access views programmatically or in the Application environment.
Views and pages: Objects of the same view can belong to different form pages; only objects of the current page (and of page 0 if it is visible) can be displayed, regardless of the view configuration.
Views and levels: Views are independent of object levels; there is no display hierarchy among different views.
Views and groups: Only objects belonging to the current view can be grouped.
Current and Default views: The Default view is the first view of a form and cannot be deleted; the Current view is the view that is being edited and the name is displayed in bold text.
Any object created in a form is placed in the first view ("View 1") of the form. The first view is always the default view, indicated by (Default) after the name. The view's name can be changed (see Renaming views), however it remains the default view.
There are two ways to add additional views:
- Click on the Add a new view button at the bottom of the View palette:
- Right-click on an existing view and select Insert view:
There is no limitation on the number of views.
By default views are named as "View" + the view number, however you can change these names to improve readability and better suit your needs.
To rename a view, you can use either:
Double-click directly on the view name (the selected view in this case). The name then becomes editable:
Right-click on the view name. The name then becomes editable:
You can change the display order of views by dragging/dropping them within the View palette.
Note that the Default view does not change:
To rename a view, you can use either:
Click on the Delete the selected view button at the bottom of the View palette:
Right-click on the view name, and select Delete View:
If a view is deleted, any objects in it are automatically moved to the Default view.
Once views are created, you can use the View palette to:
- Add object to views,
- Move objects from one view to another,
- Select all objects of the same view in a single click,
- Display or hide objects for each view,
- Lock the objects of a view.
Adding objects to views
An object can only belong to a single view.
To create an object in another view, simply select the view in the View palette (prior to creating the object) by clicking its name (an Edit icon is displayed for the Current view and the name appears in bold text):
Moving objects between views
It's also possible to move one or more objects from one view to another. In the form, select the object(s) whose view you wish to change. The view list indicates, using a symbol, the view to which the selection belongs:
The selection can contain several objects belonging to different views.
Simply select the destination view, right-click, and select Move to:
Select the destination view of the selection and click Move to button at the bottom of the View palette:
The selection is then placed in the new view:
You can also move an object to another view via the object's context menu. Right-click on the object, select Move to view, and select a view from the list of available views:
The Current view is shown in bold text.
Select all objects of a view
You can select all objects belong to the same view in the current page of the form. This function is useful for applying global changes to a set of objects.
To do this, right-click on the view in which you wish to select all the objects, click on Select All:
You can also use the button at the bottom of the View palette:
Show or hide objects of a view
You can show or hide objects belonging to a view at any time in the form's current page. This way you can focus on certain objects when editing the form, for example.
By default, all views are shown, as indicated by the Show/Hide icon:
To hide a view, click the Show/Hide icon. It is then dimmed and objects of the corresponding view are no longer shown in the form:
The Current view cannot be hidden.
To show a view that is hidden, simply select it or click on the Show/Hide icon for that view.
Locking objects of a view
You can lock the objects of a view. This prevents them from being selected, changed, or deleted from the form. Once locked, an object cannot be selected by a click, a rectangle, or the Select Similar Objects command of the context menu. This function is useful for preventing handling errors.
By default, all views are unlocked, as indicated by the Lock/Unlock icon next to each view:
To lock the objects of a view, click the Lock/Unlock icon. The padlock is shut, which means that the view is now locked:
The Current view cannot be locked.
To unlock a view that is locked, simply select it or click on the Lock/Unlock icon for that view.