? ListView.Item.Label.Text

GMan

Well-Known Member
Licensed User
Longtime User
? CustomListView Label Height

Depending of the partial content of a line (in this case "E-") the Items Label Color of a ListView should be in another color.

I tried this code, but it didn't work:
B4X:
For Each Line As String In File.ReadList(SDCardPath & "Test","Test.lst")
If Line.Startswith("E-") Then
ListView1.SingleLineLayout.Label.TextColor = Colors.Gray 
ListView1.AddSingleLine(Line)
Else
ListView1.SingleLineLayout.Label.TextColor = Colors.Green 
ListView1.AddSingleLine(Line)
End If
Next

Can anyone see why ?
The color was always gren, not gray
 
Last edited:

GMan

Well-Known Member
Licensed User
Longtime User
Hoi Klaus,

thx 4 the advice, now it works.
Do you also know how i can cnahnge the height of the Labels ? (not Textsize)
 
Upvote 0

GMan

Well-Known Member
Licensed User
Longtime User
Thx, i know that - but now i am using a CustomListView, and there is not this parameter (AFAIK)

I tried this, but causes a NullPointer Exception:
B4X:
Dim p As Panel
   p.Initialize("")
   p.Color = Colors.Black
   p.Height = 25dip
 
Last edited:
Upvote 0
Top