Skip to main content
Chi
Associate II
January 17, 2019
Solved

How to reuse a Custom Container in a new TouchGFX project

  • January 17, 2019
  • 1 reply
  • 1226 views

​Hi all, it seems that simply copying related files to path doesn't work and the reason is likely to be that the widget hasn't been registered in the new project yet. Wondering how to do the grafting work correctly.

This topic has been closed for replies.
Best answer by Martin KJELDSEN

Hi @Chi​ ,

Currently there's no way to directly copy just a Custom container from the designer to another project. You have to import an entire gui from another .touchgfx file. I think it's something we'd like to make easier.

Your only option is to create it again, or to simply copy the generated code to your new project and rename the class (From MyCustomContainerBase to something else) and use that as code in your concrete views. If it's not too complex, i'd remake it. Or you can snip the code from the .touchgfx file if you can identify it. But i will bring this topic up again!

Thanks,

Best regard,

Martin

1 reply

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
January 24, 2019

Hi @Chi​ ,

Currently there's no way to directly copy just a Custom container from the designer to another project. You have to import an entire gui from another .touchgfx file. I think it's something we'd like to make easier.

Your only option is to create it again, or to simply copy the generated code to your new project and rename the class (From MyCustomContainerBase to something else) and use that as code in your concrete views. If it's not too complex, i'd remake it. Or you can snip the code from the .touchgfx file if you can identify it. But i will bring this topic up again!

Thanks,

Best regard,

Martin

Associate III
March 14, 2024

Has there been any updates on this matter?