Skip to main content
HHarj.1
Associate III
February 19, 2020
Question

Scrollable container and wildcard values

  • February 19, 2020
  • 4 replies
  • 3564 views

Hello again,

I have a bunch of measurement results that I would like to display on the screen but space is getting too little. I looked at the scrollable container example, where the long text was put as a text resource (or whatever that is). However, my measurement results aren't, of course, static text so I would need to use wildcard text buffers. How could I implement this? 

This topic has been closed for replies.

4 replies

Romain DIELEMAN
ST Employee
February 20, 2020

Hi,

What do you meant by "Space is getting too little"? Could you use multiple textArea widgets instead of one big one?

Could you add a screenshot of what your project looks like on Designer and possibly a bit more detail on what you wish to show? Some of the other examples might help you where they show a fixed text and changing values (for example the RadioButton example where Ressource is used but with non static text)

/Romain

HHarj.1
HHarj.1Author
Associate III
February 20, 2020

Hi,

here is an example. I am using multiple text area widgets. There is a static text area for each measurement result (V1, V2..etc) and then a wildcard buffer for each of them. There are more results I would like to display than I can get fit on the display. Therefore I thought a scrollable container would be good, but I don't know how to implement that with wildcard values. I know how to do that with static text or normally with wildcard values when everything fits on the screen. I can make the font size smaller, but you can only do that for a certain point and it's not a good solution.

0690X00000DBxLHQA1.png

Romain DIELEMAN
ST Employee
February 20, 2020

Instead of a scrollable container use a scollWheel or scrollList. I believe this is exactly what you need for your situation since you can have as many elements as you like with the textArea widgets you need. You can have a look at Tutorial 4 and at some of the projects using those widgets (some examples configure the scrollWheel or list through code and not designer directly, like in Demo 3).

Krautermann
Senior
July 18, 2023

I am trying to do the same thing where I want to update the wildcards in the scroll list but I cannot find the wild card in Screen2ViewBase.cpp even though I created them on TouchGFX Designer.

 

So I need help and thus bumping this post. A solution has not yet been posted.

Graduate II
July 18, 2023

Hello

Because items in ScrollList must be containers, not single textAreas, you cannot find wildcard buffers of list items from the view- class base file. Instead you must make function to your list-item container to update texts and then call this function from view- class.

Maybe I make some example, what things you need to your scroll list ... Typed texts or wild card buffer -texts, select item highlight, callback to view when some item selected ?

 

Krautermann
Senior
July 18, 2023

Hi @JTP1 

Thank you for your reply. I don't need to select any item, however I need to fill the table with incoming data from SPI/UART.

I have put a wildcard inside the scroll list container and this should store the received buffer - Do you know how to do that? It seems I need to do an infinite switch case function??Table.PNG

Also how do I make the table scroll up automatically as it gets filled?

Graduate II
July 18, 2023

Hello. How many lines you should have then totally ? It might problematic if you want to save big amount of data.

Krautermann
Senior
July 19, 2023

I don't want to save any data, just want to display them on an infinitely long table. The data received from SPI comes in at around more than 10,000 per second, I want to display all of them if possible on the table.

I was successful yesterday at displaying random chars in the table but I have yet to figure out how to export SPI data to the table and make the table scroll up automatically.

Krautermann
Senior
July 19, 2023

Maybe I do need to save the data after all, but it can be overwritten with time I suppose.