Scroll List: How to pass information to/from backend from inside custom container items.
- June 2, 2021
- 1 reply
- 1044 views
Version: Touch GFX Designer 4.16.1
Project is attached.
My question is similar to:
I looked at the ContainerCallback example that Martin posted and I think I understand what he is trying to show.
In that solution though, the View register itself to a known custom container name (i.e. customContainer11)
Screen1View::Screen1View()
{
customContainer11.setPtr(this);
}If my custom container is an element inside a Scroll list, where is a good place
to call setPtr()? from inside ListUpdateItem()? or is there a better place?
essentially I am looking to have the onGroupLightLevelChange() in my example to notify the View -> Presenter -> Model of a value change.
Also, if the backend want to influence how many items are displayed in the scroll list (e.g. item 1,3,5,8 in sequence) is there a good example on how to do that?
I am able to use lightGroupListUpdateItem() in my example to dynamically generate the groupNames and set the slider value, but If i try to skip say group 3, by setting it notVisible/Touchable, The scroll list displays a gap between group2 and group4 and when I scroll the list, group3 becomes visible again.
Thanks for everyone's time.
