Android Question Change labels color

Mostez

Well-Known Member
Licensed User
Longtime User
I have 10 labels with different names i.e (lblName, lblAddress..) they all have a parent-panel panel1, I want to change label color say, to gray, when long click event occur, and change other labels color to different one say white.

how to do that?

TIA
 

Mahares

Expert
Licensed User
Longtime User
how to do that?
Make all labels (B4XView) with the same event: lbl
B4X:
Sub lbl_LongClick
    For Each l As B4XView In Panel1.GetAllViewsRecursive
        If l=Sender Then
            l.Color=xui.Color_Red
        Else
            l.Color=xui.Color_White
        End If
    Next    
End Sub
 
Upvote 0
Top