Android Question Sender label color

dibesw

Active Member
Licensed User
Longtime User
I have this list of label:

view.png


I woud like tap in any label in any rows and to change color of all label in the row.

This is the code:

B4X:
    For ii = 0 To NumberOfColumns - 1
        Dim l As Label
        l.Initialize("cell")
        l.Text = Values(ii)
        l.Gravity = Alignment
        l.TextSize = FontSize
        l.TextColor = FontColor
        l.Color=CellColor
        Dim rc As RowCol
        rc.Initialize
        rc.Col = ii
        rc.Row = NumberOfRows
        l.Tag = rc
        totta=RowHeight * NumberOfRows
        scvPersons.Panel.AddView(l, TotalColumnWidth(ii), totta, ColumnWidth_1(ii), RowHeight_1)
    Next

Long tap to cell...

B4X:
Sub cell_LongClick
    Dim l As Label
    l = Sender
    Dim rc As RowCol
    l.color=CellNoPaz
    rc=l.Tag
    Dim pp As PAge
    pp = List1.Get(rc.Row)
    'For Each v As View In scvPersons.Panel.GetAllViewsRecursive
    '    v.Color=CellNoPaz
    'Next
End Sub

Now when I tap into a cell, it change color of that single cell.
I can only color all the cells.
How can I do for to color only a whole row?
Like this...
view2.png


Thanks for anyone who wants to help me
 
Last edited:
Top