Accessing views on a panel

PHB2

Member
Licensed User
Longtime User
I have a ScrollView which I have added a number of panels (items as I call them) onto the ScrollView.Panel.

Each item Panel has a check box, an image and a label.

The ScrollView is a global, so have access to it from any Sub in my module.

How do I (programatically) access say the check box value of each item Panel?

Many thanks,

Mark
 

klaus

Expert
Licensed User
Longtime User
In the ScrollView.Panel you can get the internal item Panel with:
B4X:
Dim pnl as Panel
pnl = ScrollView.Panel.GetView(ItemIndex)
And in the item Panel you can get the internal views with:
B4X:
Dim pnl as Panel
pnl = ScrollView.Panel.GetView(ItemIndex)
Dim cbx As CheckBox
Dim img As ImageView
Dim lbl As Label
cbx = pnl.GetView(0)
img = pnl.GetView(1)
lbl = pnl.GetView(2)
Best regards.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…