KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Objects as Templates
PRODUCT: 4D | VERSION: 11.4 | PLATFORM: Mac & Win
Published On: July 30, 2009
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

When designing forms, the most efficient way of keeping consistency is to find common denominators. In UI design it is common that objects in a form should maintain a theme as much as possible. If the characteristics of each type of object are defined in one form, they can easily be maintained in the rest of the application by using the object as a model for the rest of the objects of the same type to be created.

One way to ensure that objects are created with the same properties in different forms is to create the first object, assign its properties, then make it a "model" for the rest of the objects of the same type that you create after that.

Follow these steps to create a template of an object:

  1. In a form, create an object and assign it as many properties as you feel should be shared throughout the database.



  2. Using the contextual menu of the object, select Use as Template.



  3. The subsequent objects will retain the properties of the Template, except the fixed coordinates and the object method.



  4. To delete the Template, simply assign a different object to Use as Template.
  5. To get back to the default Templates for the Database, use the Clear all custom templates option in the application Preferences Design Mode/Form Editor theme.