i'm trying to change the text color within my listviewitem for a text object. I have multiple text objects in the listviewitem. I'm using the below code
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
The error when debugging says inaccessible object yet i have no problem changing the color when i do the below
LItemheader.Purpose := TListItemPurpose.Header;
Litemheader.Objects.TextObject.TextColor := TAlphaColorRec.blue;
any ideas?
Found the answer :
TListItemText(Litem.Objects.FindDrawable('ytde')).TextColor := TAlphaColorRec.Red;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With