It is possible to use an object library with each user form being modified.
An object library is an external file created by 4D in the Design environment. It allows storing all types of objects that can be used in forms: buttons, texts, pictures, hierarchical lists, etc. Libraries are put together and used by a simple drag and drop or copy-paste from 4D forms. They are somewhat like a permanent clipboard. Object libraries are described in Creating and using custom object libraries.
Objects are stored with all their properties and standard actions. It is not possible to use objects with associated object methods in the user form editor. Only objects that do not have associated object methods will be visible in the library from the user form editor.
The developer sets the library associated with the form using the last parameter of the EDIT FORM command which displays the user form. If this parameter is valid, the library can be displayed and used with the user form. To open the library, the user must click on the corresponding icon in the toolbar of the editor: ![](../../picture/437112/pict437112.fr.png)
The library window is then displayed:
![](../../picture/437403/pict437403.en.png)
Note: An object library can contain up to 32,000 items.
The user can add objects to the form by drag and drop or copy-paste from the library. All the properties of objects inserted from the library are automatically accessible to users (coordinates, dimensions, appearance, etc.).
Each object library has a context menu that allows accessing basic editing commands. In the user form editor, only the Copy command is available. Moreover, it is not possible for the user to remove, rename or add objects in the library.