2025-05-19 2:36 AM
Hello All,
I am new to touchgfx and looking to implement something where a array of structure containing name and other parameters to display. I need to display parameters on selection of the names displayed.
I have a created a container and able to update the parameter names to the textarea of scrollist as in picture.
Now i need to implement a way where user can select any one Preset name and those corresponding parameters should load to the respective area. as in image attached.
Just let me know the way to do it will try out things as suggested.
2025-05-19 3:45 AM
Hello @ShivDesh ,
Now that you have your scroll list, all you have left to do is to execute code when an element is pressed.
You can do that with the setitempressedcallback function.*
You can see how to do that in this tutorial or in the scrollList example :
Regards,
2025-05-19 5:20 AM
Hello @GaetanGodart ,
Thanks for the quick reply,
I am using scroll list for displaying the Names, tried to go through the link you send but still it's not clear if the (setitempressedcallback) can be used for Scroll list, for scroll wheel it can be used.
if you could please explain or provide any example for scroll list items to detect press, I can try to do same and update you.
Regards,
Shiv
2025-05-19 5:32 AM
In the scrollList and scrollWheel example, we do update the image when we press one of the scrollList item.
I think this is this part of the code:
Basically, just use the setItemPressedCallback, create a handler for it and then a switch case.
This is also what we do in the tutorial I shared but in the tutorial we use a scrollWheel (this is basically the same).
Regards,