I need some example how to change color text item for each row from my list view in FireMonkey.
I try something like this but unsuccessfully.
for i := 0 to lvArtikli.ItemCount-1 do
begin
AItem := lvArtikli.Items.AppearanceItem[i];
pk := AItem.Data['txtPK'].AsString;
if pk = '' then
begin
//change color
TListItemText(AItem.Objects.FindDrawable('txtPK')).TextColor := TAlphaColorRec.Red;
end;
end;
In order to color a certain column, and for each row it is necessary to put the following code on event onUpdateObjects.