cancel
Showing results for 
Search instead for 
Did you mean: 

How to Import Widgets

PChil.1
Associate II

I am working on a project that I would like to import a keyboard into, like the one in the examples. How do I import widgets into projects?

1 ACCEPTED SOLUTION

Accepted Solutions
Karan 123
Senior
8 REPLIES 8
Karan 123
Senior

Hi,

Please check below link.

https://www.youtube.com/watch?v=uE6eiTjOP-g&t=1251s

Hope this helps.

--

Karan

PChil.1
Associate II

I will watch that, thank you.

Martin KJELDSEN
Chief III

Hi,

There's currently no good way of importing a single widget (it usually consists of both json definition as well as custom code). You can import a complete GUI from another project, but this is not what you want. We're discussing how to best create a reusable widget/screen repository.

/Martin

PChil.1
Associate II

Thank you for your answers!

@Martin KJELDSEN​ , looking forward to that implementation. A widget/screen repository would alleviate a lot of issues and be very helpful.

Another thing that would be useful is to be able to simply copy/paste widgets (or any Designer elements) from one instance of TouchGFX Designer to another instance of the Designer. The only way to copy/paste currently is from one screen to another in the same instance of TouchGFX Designer.

I have numerous projects that are similar and I would like to do this, but I end up having design it all over again or I copy parts of the JSON code and other files with a difference/merge tool.

Would you expect the custom code for that widget (e.g. Custom Container) to be copied with the gui definition?

No problem!

I do understand the dilemma. I could be wrong, but isn't it true that the gui definition is not created until a "Generate Code" is done?

I have copied Custom Containers manually by copying parts of the JSON file as well as gui files and maybe that is the only way it can be done. It might be worth writing a tutorial for doing this.

You mentioned a reusable widget/screen repository, which might be the way to go. If custom containers located in a repository were available in the Designer we could easily have access to it.