Shay Well-Known Member Licensed User Longtime User Oct 29, 2014 #1 Hi I have the following code, very simple ListView I have for loop for 2 items first item second label is red second item second label is green if I run this code, I get green on 2 items, while debug is showing: red, green if I run it step by step, then it is ok - first line is red, second is green Code: Copy If jobtook="1" Then ListView1.TwoLinesLayout.SecondLabel.TextColor = Colors.Green Log("green") Else ListView1.TwoLinesLayout.SecondLabel.TextColor = Colors.Red Log("red") End If
Hi I have the following code, very simple ListView I have for loop for 2 items first item second label is red second item second label is green if I run this code, I get green on 2 items, while debug is showing: red, green if I run it step by step, then it is ok - first line is red, second is green Code: Copy If jobtook="1" Then ListView1.TwoLinesLayout.SecondLabel.TextColor = Colors.Green Log("green") Else ListView1.TwoLinesLayout.SecondLabel.TextColor = Colors.Red Log("red") End If
klaus Expert Licensed User Longtime User Oct 29, 2014 #2 ListView1.TwoLinesLayout sets the layout valid for ALL two line items. Upvote 0
Shay Well-Known Member Licensed User Longtime User Oct 29, 2014 #3 so you mean all the boxes text can be either red or green? if so how can I overcome it? and why in step by step I can see different colors (also after code is done running, 1 box is red, and second is green) Upvote 0
so you mean all the boxes text can be either red or green? if so how can I overcome it? and why in step by step I can see different colors (also after code is done running, 1 box is red, and second is green)
DonManfred Expert Licensed User Longtime User Oct 30, 2014 #4 Shay said: if so how can I overcome it? Click to expand... Use a customlistview instead of listview. Upvote 0