cancel
Showing results for 
Search instead for 
Did you mean: 

Adding new CustomContainer to ScrollWheel

masterML5
Associate

Hello,
I need help how to add new customcontainer to scrollwheel dynamically.


First I created customcontainer named MenuElement, add TextArea named textItem and Button named buttonRemove to it.


Second I add to screen (menuScreen) scrollwheel element with propertis : Number of elements = 0 and Initial Selected Item = -1, ItemTemplate = MenuElement.

In code I want when button is clicked to call function(interaction to call new virtual function) which will add new item(MenuElement) to scrollwheel and set it to next index of existing MenuElements in scrollwheel.


Screenshot_2.png

1 REPLY 1

Hello @masterML5 ,
I suggest you using a List Layout instead of Scroll Wheel because it would be easier to add an item to it dynamically. There is a List Layout example in TouchGFX that implements a functionality similar to the one you are looking for. You can read more about List Layout and the example here 

I hope this helps you

Mohammad MORADI
ST Software Developer | TouchGFX