Import/export custom container from code files to an other touchgfx project
Hello,
I'd like to export a custom container from a GFX project to an other GFX project.
What's the proper way ?
Thanks.
Hello,
I'd like to export a custom container from a GFX project to an other GFX project.
What's the proper way ?
Thanks.
Hi,
Is it a custom container made through Designer or through code ? If through Designer then there are no ways to easily share it to another TouchGFX project (working on it). If you have made your custom container through code then you can easily add the corresponding files to your new project. The downside with doing custom containers through code is that you will not be able to see them in the canvas view of TouchGFX Designer (they will appear in the simulator).
I would still recommend creating a custom container through code based on the one you might have made through Designer if you plan on using it in multiple other projects. What I personally do when I work with custom widgets that are not displayed in the canvas view is to add a box widget with the same size as the custom container. I then set it invisible at start up and change the coordinates of my custom container based on the ones of the box.
Something else I do when I know I will use a custom container from another project, and if I have not started my project yet, is to use the "import UI" function in Designer to import the UI of the project with the custom container to the new project. You then need to get rid of the rest. It is not a good workflow but is fine for my projects.
Hope this helps,
/Romain
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.