499 views
in Embedded Wizard Studio by
How to customize the Gallery in order to have a quick access to my own widget templates, classes or objects?

1 Answer

+1 vote
by

Embedded Wizard Studio offers the possibility to customize the Gallery for your own template classes or objects. This article describes the way, how to add an own template to a separate folder within the Gallery window.

When clicking with the right mouse button into the "Templates" view of the Gallery, a context popup menu appears which provides the commands to create, delete and rename folders and templates.

First select "Create new folder" from the popup menu. Then click again with the right mouse button on the new folder in the Templates gallery and select "Rename" to change the name e.g. to "MyTemplates".

Now you can add a class from a unit or a member object from any class or even a whole unit from the project to your gallery folder. To add a new template select the brick or object in the composer, press the key <CTRL> and then drag and drop it to your template folder in the gallery. Then click again with the right mouse button on the new template and select "Rename template" to change the name e.g. to "MyClass".

All private folders within the Templates view are mapped to a subdirectory of the folder "Templates20" (because your project is based on Mosaic20) in the following directory:

{UserDocumentFolder}\AppData\Local\EmbeddedWizard\Templates20

For each private folder a separate subdirctory is created, e.g. \MyTemplates.ewgf

All templates are stored as readable Chora code files within these subdirectories, e.g. \MyClass.ewg

If you want to transfer some of your template folders to another PC, you have to copy these subdirectories into the corresponding directory and to restart Embedded Wizard. To avoid the deletion of a template by mistake, you can set your template folder and files to write protected.

Please avoid any mixture of templates from different versions of the Mosaic class library.

by
I tried to add a unit full of colors and fonts in this fashion.  It seems just to have added an empty unit instead when i try to drag it into the project.
by
Open your unit, select all color constants and fonts and drag them into the Gallery (into your private folder). Rename the new entry, e.g. 'My fonts and colors'. Then you can simply add all these colors and fonts into another project, by drag and drop this entry into the desired unit.
by

Hi Manfred Schweyer,

We are trying to use customize template in the team, but there are two problems with it:
1. How to ensure that the local template is the latest version? For example, I modified the template locally and uploaded it to the git repository, but other colleagues did not update the template in time and compiled the project directly, which caused an error but was difficult to find. How to avoid this kind of problem?
2. How to modify the existing Template? Because the current Template file cannot be modified directly, it needs to be modified locally and then copied and overwritten. This is not very convenient. Is there a better way?

by

Hello,

the templates within the Gallery should have some final release state - otherwise, it does not make so much sense to put them into the Gallery Template Window. Once these templates are completed and stored in the Gallery, it is convenient to take a copy out of the Gallery - see chapter Managing templates

Alternatively, you can keep your base classes within the project, so that every team member can update to the latest version. When you want to use one of the base classes, you can use the Gallery Browser Window to create an instance of a certain class.

Best regards,

Manfred.

by
Thank you very much. As you mentioned, We can use normal base classes to work, and only make some basic components into Templates, which can meet our needs.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...