ok i have updated following parts. as all labels are already inside a panel (this is also what i would have done) you can add all labels easily with a simple loop:
myLblList.Initialize
For Each v As View In pnlBar.GetAllViewsRecursive
myLblList.add(v) 'add all labels to the list
Next
myLblList is a List and what i do i add all views (labels) in the pnlBar to the list when b4x page is created.
now all i need to do is just catch the clicked label with a sender object like this:
Sub btn_Click
Dim myLbl As Label = Sender
Dim clickedID As String = myLbl.Tag
For Each lbl As Label In myLblList
If lbl.tag = clickedID Then lbl.TextColor = 0xFF92BF2C Else lbl.textcolor = 0xFFB4B4B4
Next
End Sub
what i do i change all labels EVENTNAME in the pnlBar to "bnt" like this each label that is clicked will call this event.
now you have a set of 2 labels so you want always to change 2 labels if one is clicked to do that i give to the paired label the same TAG value.
so btn1 and btn1b has the same tag("0"), btn2 and btn2b has also the same tag ("1"), ...
in the event i just ask for the clicked tag and if in the list a label has the same tag i change the color to green else it will stay gray (or the color you picked i dont understand
0xFFB4B4B4. i use ints for colors
The project is attached. Good Luck with your Project