cancel
Showing results for 
Search instead for 
Did you mean: 

How to reuse TouchGFX content?

DSwea.1
Associate III

I'm still getting up to speed with TouchGFX, but I'm puzzled as to how to reuse existing content in new projects. There is no SaveAs command, so that option is out. I tried running 2 copies of the application with the idea of copying and pasting screens between projects, but copy/paste seems to work only within the active project. So how is one to reuse content (say a screen one has invested a good deal of time creating) from existing projects in new projects? This capability is absolutely essential in text-based code, so maybe I'm just missing a detail of how to do so in TouchGFX.

4 REPLIES 4
Alexandre RENOUX
Principal

Hello DSwea.1,

There is no automatic way to reuse content in the current version of the Designer.

To reuse content, you need to do it manually (albeit tedious) by

  • Editing the .touchgfx file with the information about your screen-to-be-reused
  • Copy paste the code of your screen in an empty screen previously created in the Designer of your new project.

Sorry for the inconvenience and hope this will help you

/Alexandre

Romain DIELEMAN
ST Employee

Another option would be to use the "import GUI" option when starting a new project where you import the GUI of the project with that one screen you intend on reusing.

/Romain

Hi @Romain DIELEMAN​ 

Where is that option in 4.20.0?

Edit->Import->GUI

or

Edit->Import->Custom Container