For now I'm just doing<br><b>Retang.Right := Retang.Right -4;</b><br>Is there a better way?<br><br><div class="gmail_quote">2010/11/1 Alexsander Rosa <span dir="ltr"><<a href="mailto:alexsander.rosa@gmail.com">alexsander.rosa@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I've managed to set the color of a specific subitem, but it's getting misaligned horizontally.<br>
It seems there's some small margin around the text and I do not know how to calculate it.<br><br>if (SubItem = 4) and (StrToIntDef(Item.SubItems[4],0) > 5) then<br>
begin<br> Retang := Item.DisplayRectSubItem(SubItem+1, drBounds);<br>
estilo := TCustomListView(Sender).Canvas.TextStyle;<br> estilo.Layout := tlCenter;<br> estilo.SystemFont := false;<br> estilo.Alignment := taRightJustify;<br> TCustomListView(Sender).Canvas.Font.Color := clRed;<br>
TCustomListView(Sender).Canvas.TextRect(Retang,Retang.Left,0,Item.SubItems[4],estilo);<br> DefaultDraw := false;<br> end;<br><br clear="all">Any ideas? <br><font color="#888888"></font><br></blockquote></div><br clear="all">
<br>-- <br>Atenciosamente,<br>Alexsander da Rosa<br>Linux User #113925<br><br>"Extremismo na defesa da liberdade não é defeito.<br>Moderação na busca por justiça não é virtude."<br>-- Barry Goldwater<br>