Android Question XUI ScrollView2D, how to access the items?

james_sgp

Active Member
Licensed User
Longtime User
Hi everyone, i'm working on an app which shows the layout of an even hall. I`m using Star Dusts XUI Scrollview2D, and I add buttons programmatically to it based on the positions of the stalls. I have working code for when a button is pressed (using the buttons tag) it calls up some data about it.

But what I would like to do is change the color of some of the buttons after they have been created, without the user pressing them?

Thanks in advance
James
 

Brian Dean

Well-Known Member
Licensed User
Longtime User
If you are creating the buttons programatically then after you create each one add it to a List. I guess that you know the Tag value of the button that you want to change, so scan the list until you find the button with the Tag value that you want and change its colour
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Use ScrollView2D.GetAllViewsRecursive As List or ScrollView2D.GetView(Pos As Int) As B4XView
 
Upvote 1
Solution
Top