cancel
Showing results for 
Search instead for 
Did you mean: 

FUTURE REQUEST For Touch GFX, please ARRAY! ARRAY! ARRAY!

JHERI
Senior

Hello

I'm still very new to Touch GFX

Still finding my way with programming in C++ as I'm more C based,

The biggest drawback I’m finding is the TouchGFX design environment when laying out screens does not allow you to add objects (Widgets) as arrays (multiples of the same).

Why on earth would this not have been implemented ??

This approach allows for much more efficient and logical coding for controlling each widget in for loops etc.
Is there any plan in the future to add this much needed option in the ToughGFX designer when laying out more complex screens of multiple objects / widgets

Thank in advance for any info

15 REPLIES 15

You missunderstand. TouchGFX is designer generator. You can generate empty screen and write all code in screensetup method plus headers. Use any arrays as you require. Yes you need basic C++ knowledge.

JHERI_0-1694618182848.png

ok

so it would seem from the above image I have started to learn about custom containers for the first time?

I understand a custom container can store multiple widgets

1) give the custom container a name

2) add your desired widgets to the custom container

in my case 8 leds, title each led to mean something, redLEDon_Left etc

I have added 8 led images to one custom container

4 LED images on the left and 4 LED images on the right

JHERI_1-1694618493611.png

3) now you can drag and use your custom container multiple times on one screen or many screens I believe

4) now compile and generate code

5) now the tricky bit ......

working out how to access/reference and make multiple custom container arrays and the same for the child objects in the containers

but happy to have learnt about custom containers

 

Panchev68
Senior

At first glance, TouchGFX seems quite complicated to work with, but in practice it is not. The team that developed the environment has done a great job.

Piranha
Chief II

Hi

yes I have followed a few in depth tutorials on touch gfx regarding sending and returning struct variables from the model to the presenters of each screen and successfully managed to set   gauges and sliders to values leave the screen and jump to another and come back to the gauge screen and it still kept the values previously.

albeit a little bit involved sending values from the screen to the presenter and then from the presenter to the model but worked fine

I'm not to sure about C++ and classes, don't really get it, so this is adding confusion to the mix though trying to break everything down bit by bit

its very different to a normal nucleo 446RE board and peripherals that im use to in C code and cube mx and visualVDB

really need to try and understand the code that the touchgfx designer creates as i guess this does some of the initial hardware initialising and creating functions for the various screens and widgets created in the designer ?

just need to understand classes and how to reference all the widgets and containers & custom containers and child object within each screen layout

but can see by using custom containers it will start to simplify code and widgets, just need to understand how to code the custom containers objects

thanks yes did look at this as another option along with crank and embedded wizard, but last two very very costly