Skip to main content
APate.18
Associate III
October 19, 2023
Question

TouchGFX : Scrolllist

  • October 19, 2023
  • 6 replies
  • 2960 views

Container Has 3 Widget (Box , 2 Button ) 

Container is used in scroll list , I have selectedHandler for Index but how can we get Which widget is selected form this itemIndex .

This topic has been closed for replies.

6 replies

ST Employee
October 24, 2023

Hello @APate.18 ,

ScrollList is used for similar items, but you are planning to use different items. In this case, it's better to use Scrolable Container instead, and then using interactions for each button to implement your desired functionalities.
You can read more about Scrolable Containers here:
https://support.touchgfx.com/docs/development/ui-development/ui-components/containers/scrollable-container

Don't hesitate to ask more questions

Mohammad MORADIST Software Developer | TouchGFX
APate.18
APate.18Author
Associate III
October 25, 2023

Hey MORADI ,

Thanks for reply

Actully i am using list of elements as i have attached one image

I have Few requirement for this

1) This List should be scrollable and list of item should decided on runtime

2) There are 3 different widgets in one container 

     i) Up arrow as a button 01

     ii) Down Arrow as a button 02

     iii) Box 

all 3 are tapeable

3) while we tapped on widget we require 

          i) Index of tapped item

          ii) which widget is tapped

for saving their state 

 

please let me know any solution for this i have tried scroll list but it wont work for saving state of tapped item differently because we get one index from handler 

its little bit urgent 

Graduate II
October 25, 2023

Hello

You can use callbacks to trigger parent (view) when some of those three widgets is pressed. Here is simple example, modified from some old example. I was lazy and use flex button as text box. You run it on simulator, it is made in version 4.21.4 but seems to work also on later versions.

Hopefully you get the idea out of it.

Br JTP