<div>Is there an example of TListView's CustomDraw?</div><div>The following code (found here [1]) did not work:</div><div><br></div><div><span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView;<br>
Item: TListItem; State: TCustomDrawState;<br> var DefaultDraw: Boolean);<br>const<br> cStripe = $CCFFCC; // colour of alternate list items<br>begin<br> if Odd(Item.Index) then<br> // odd list items have green background<br>
ListView1.Canvas.Brush.Color := cStripe<br> else<br> // even list items have window colour background<br> ListView1.Canvas.Brush.Color := clWindow;<br>end;</span><br><br></div><div>[1] <a href="http://mantis.freepascal.org/view.php?id=9255">http://mantis.freepascal.org/view.php?id=9255</a></div>
<div><br></div><div><div class="gmail_quote">2010/10/12 Bo Berglund <span dir="ltr"><<a href="mailto:bo.berglund@gmail.com">bo.berglund@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have tried to port our Delphi7 descendant of TListView to Lazarus<br>
but it seems like the Lazarus implementation lacks a number of<br>
properties that are present in Delphi.<br>
Just as an example: There is no Gridlines property available.<br>
<br>
Is there a more complete implementation available anywhere?<br>
<br>
I am running Lazarus 0.9.28.2 and FPC 2.2.4 on WindowsXP off of the<br>
recommended installer at SourceForge. Downloaded and installed 2 weeks<br>
ago.<br>
<br>
I also noted via Google that there was some discussion on<br>
implementation incompleteness of TListView back in Jan 2008, so surely<br>
this should have been fixed by now?<br>
<br>
<br>
--<br>
Bo Berglund<br>
Developer in Sweden<br>
<font color="#888888"><br><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#888888"><br></font></font></font></blockquote></div><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>
</div>