Skip to main content
Feb 17, 2020 7:55 PM UTC
Question

Adding text while working

Hello!

I work with textArea.

I want to add new text while program working. For example - I get array of filenames and I want to put filenames to screen (and later select one of them by touching).

How can I do this? How to create new textArea while program is working?

This topic has been closed for replies.

5 replies

Romain DIELEMAN
ST Employee
Feb 18, 2020 8:22 AM UTC

Hi, I am unsure I understand what you wish to do. If you just wish to have a textArea that pops up while running for any reason (like a button clicked or a value reached) the easiest solution would be to add a textArea widget in Designer and set its alpha at 0 (or uncheck the Visible option) so that it will be invisible on screen. Then modify its alpha value to 255 (or set as Visible) in your code when you wish the textArea to appear.

Hope this helps but if this is not what you were looking for, please add some more context and code/pictures so that we can have a better insight of your issue.

/Romain

Feb 18, 2020 8:30 AM UTC

Thanks!

May be, textarea is not that I need...

​

I​ want make SDcard directory browser. I want to make list of files, and name of each file must be selectable.

I don't know, how much files will be found - for example, it will be 1000. CRreation of 1000 invisible textarea or othe widgets -is not good idea.

​

Please, advise me good way to make file browser with touchgfx.​

Romain DIELEMAN
ST Employee
Feb 18, 2020 8:46 AM UTC

I suggest you have a look at the Scroll Wheel and Scroll List widgets, they might be a solution to what you are looking for. There are several UI templates available on Designer when creating a new project that use those widgets like the List Layout Example or the Scroll Wheel and List Example.