cancel
Showing results for 
Search instead for 
Did you mean: 

How to reuse a Custom Container in a new TouchGFX project

Chi
Associate II

​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.

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

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

View solution in original post

2 REPLIES 2
Martin KJELDSEN
Chief III

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

Has there been any updates on this matter?