2023-10-19 05:09 AM
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 .
2023-10-24 01:24 AM
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
2023-10-24 10:26 PM
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
2023-10-25 10:11 AM
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
2023-10-26 02:06 AM
Hello again,
Based on the picture you have provided, I suggest you to create a Custom Container first, and handle the logic there (in other words, implement the function for updating the state inside to custom container class). Then, you can use a Scroll List with the custom container you created as its Item Template. You have to set the number of items and make sure the list is large enough to show all the available items (probably the list will go outside of the screen which is fine).
I have uploaded a photo to demonstrate how your scroll list should look like.
Honestly, I didn't understand your point about item being decided on runtime. Do you mean you want to change the items of the list while the application is running?
2023-11-30 01:49 AM
Thank you
2023-12-05 07:23 AM
You're very welcome,
Good luck