4D v16.3Using static pictures |
||
|
4D v16.3
Using static pictures
Using static pictures
You can use two types of static pictures in your forms: independent pictures stored directly with the forms or picture references stored outside the forms. For better optimization, using pictures inserted by reference is generally recommended when pictures are used in several different places since it means that the picture will only be stored once. In addition, there is a link between the picture and each of its references so if you modify the source picture, all of its occurrences are automatically modified as well, wherever it is used in the database. In 4D, pictures inserted by reference have the “Library Picture” type and independent pictures have the “Static Picture” type (displayed in the Type field of the Property List). To insert pictures by reference, you must either use the picture library or drag and drop a picture stored in the Resources folder of the database. If you place a picture on page 0 of a multi-page form, it will appear automatically as a background element on all pages. You can also include it in an inherited form, applied in the background of other different forms. Either way, your database will run faster than if the picture was pasted into each page. You can assign properties to static pictures that are inserted into forms. For example the Replicated display property can be used to set a small picture as the background picture of the form: the picture is replicated as many times as necessary to fill in the page of the form. There are three ways to insert static pictures into your forms: by pasting a picture from the clipboard, by dragging and dropping a picture file or by dragging and dropping a picture from the picture library. To paste or drop a static picture into a form:
For more information about how the picture library works, refer to the Picture Library chapter. To place a picture from the picture library on a form:
The picture has a set of object properties, just like any object on the form. If you like, you can modify these properties. When you insert a picture that comes from the Picture Library, you actually insert a reference to a picture. The Property List will indicate its Type (under Objects) as a Library Picture. If the picture is modified in the Picture Library, each instance of it will be modified accordingly. You may want to dissociate a picture inserted in a form from its source in the Picture Library. To disassociate a picture from its source in the Picture Library:
You can use the Resources folder for storing static pictures used in your forms and work with them by reference. The display of these pictures is then optimized and their management is greatly facilitated. Note: For more information about the Resources folder, refer to Description of 4D files. More particularly, you can call on .png (bitmap) or .svg (vectorial) pictures. Inserting these pictures into forms can be carried out by a simple drag and drop operation from the Resources folder:
It is possible to place pictures in subfolders of the Resources folder. In particular, you can use the .lproj folder mechanism for pictures in different languages (for more information about this mechanism, refer to MissingRef). You can set the display mode of a static or library picture that is placed in a form. The display mode determines the way a picture must be redrawn when the area containing it is resized. To do this, you select the picture and then, in the "Picture" theme of the Property List, you choose an option from the Display menu:
If the picture size is reduced to a smaller size than the original picture size, the picture is truncated (not centered). The Mirror Effect (Windows) option is found in the “Picture” theme of the Property List for pictures displayed in forms. This option can be used in applications configured in “right-to-left” languages that have an inverted version of the interface (for more information about “right-to-left” mode, refer to ). By default, the right-to-left mode does not reverse the contents of pictures in forms. However, it may sometimes be necessary to invert certain pictures. This is the case, for example, with pictures used in the interface, such as arrows, that are linked with the position of objects. When the Mirror Effect (Windows) option is checked, a left-to-right (mirror effect) inversion is applied to the picture:
This option is available for static pictures and library pictures, as well as for active objects using pictures (see Mirror effect (Windows)). This option is only taken into account:
|
PROPERTIES
Product: 4D
HISTORY
ARTICLE USAGE
4D Design Reference ( 4D v16) |