cancel
Showing results for 
Search instead for 
Did you mean: 

scroll list items used as button for change screen

ab73
Associate II

Hi,

I have a scroll list with 6 items, and i want to use the selected item to change to another screen when pressed.

Is it possible? I have not seen anything on the designer to do that.

Thanks

4 REPLIES 4
GaetanGodart
ST Employee

Hello @ab73 and welcome to the community!

 

You can do that by creating a custom container and including it in one of the scrollable elements sur a list ScrollList, ScrollWheel or SwipeContainer for instance.
Than, create an interaction for each button to trigger an interaction that will change to the screen you want.

This is done in a lot of our demos :

  • Demo 1
  • Demo 2
  • Demo 5
  • Demo 6
  • Demo 7
  • Rice cooker demo

 

To learn more about TouchGFX and how to create a GUI, have a look at our documentation :

 

If this comment answers your question, I invite you to select this comment as "best answer".

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Thanks for your prompt reply.

In a swipe container you can add buttons to every page you create and that's fine, in a scroll container I have not found that feature.

I did a custom container with an image as a template and selected '6' in 'Number of items' option.

This create the scroll list with the images i want, but I can't find the feature to make them clickable as in the swipe container.

Simply add a button to the container you created.
You can add a regular button, but if you want to make the image clickable, I invite you to watch our latest video which talks about this specific design feature : Make area clickable 

But the simplest way is probably to follow this tutorial where the presenter shows how to use the callback generated when an item is selected to change an image (in your case you want to change the screen so it is the same process) : youtube.com/ScrollListExample 

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hello @ab73 ,

Have you been able to solve your problem?
If so, I invite you to select the most helpful comment as "best answer".

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)