I've managed to set the color of a specific subitem, but it's getting misaligned horizontally.
It seems there's some small margin around the text and I do not know how to calculate it.
if (SubItem = 4) and (StrToIntDef(Item.SubItems[4],0) > 5) then
begin
Retang := Item.DisplayRectSubItem(SubItem+1, drBounds);
estilo := TCustomListView(Sender).Canvas.TextStyle;
estilo.Layout := tlCenter;
estilo.SystemFont := false;
estilo.Alignment := taRightJustify;
TCustomListView(Sender).Canvas.Font.Color := clRed;
TCustomListView(Sender).Canvas.TextRect(Retang,Retang.Left,0,Item.SubItems[4],estilo);
DefaultDraw := false;
end;Any ideas?
Atenciosamente,
Alexsander da Rosa
Linux User #113925
"Extremismo na defesa da liberdade n?o ? defeito.
Modera??o na busca por justi?a n?o ? virtude."
-- Barry Goldwater
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101101/a868fda5/attachment.html>
