I am trying to change the color of text in my listviewitem for a text object. I have several text objects in a listviewitem. I am using the code below
Litem := ListView1.Items.Add; Litem.Data['ytde'] := currtostrf(ytde,ffCurrency,2); Litem.Data['ytdbe'] := currtostrf(ytdbe,ffCurrency,2); Litem.Data['ytdetotal'] := currtostrf(ytdetotal,ffCurrency,2); Litem.Objects.TextObject.TextColor := TAlphaColorRec.Green
An error during debugging indicates an inaccessible object, but I have no problems with color changes when I do below
LItemheader.Purpose := TListItemPurpose.Header; Litemheader.Objects.TextObject.TextColor := TAlphaColorRec.blue;
any ideas?
source share