Hi all.
I have a list view that I am wanting to ownerdraw. (p.s. its in report mode)
I have been able to do this, BUT the text of the items is not being drawn in the right place.
i.e. the text is always drawn on the rect.left rect.top, which is where I am am drawing....BUT the RECT is the RECT of the whole item, not the rect of the SUB item.
Therefore, whenI draw text on the rect positions, it puts all the text inthe same place.
 
How then, do I draw the text in the right positions ?
Heres my code...so far....
 
  with sender do
    begin
      canvas.brush.Color:=clred;
      rRect:=item.DisplayRect(drLabel);
      canvas.FillRect(Rect);
      canvas.TextRect(rect,rect.left,rect.top,item.SubItems[item.SubItems.Count-1]);
      canvas.brush.Color:=clwhite;
    end;
cheers,
 
Jeremy Coulter (manager)
Visual Software Solutions

110 Harewood Road
Christchurch
ph +64 3 3521595
fx +64 3 3521596
cell +21 2533214
http://www.vss.co.nz
 

Reply via email to