views:

68

answers:

1

Is it possible for a virtual string tree to look like this?

alt text

i really need help on this since i'm new in delphi..

+1  A: 

You can put something in then OnBeforeCellPaint event. For instance:

procedure TForm1.VirtualStringTree1BeforeCellPaint(Sender: TBaseVirtualTree;      
    TargetCanvas: TCanvas; Node: PVirtualNode;
    Column: TColumnIndex; CellPaintMode: TVTCellPaintMode; CellRect: TRect; 
var     
  ContentRect: TRect);
begin
  CellRect.Left := CellRect.Left + 20;
  TargetCanvas.Brush.Color := clLime;
  TargetCanvas.RoundRect(CellRect, 5, 5);
  InflateRect(ContentRect, -1, -1);
end;

Would give you a crude approximation of what you have in the picture...

N@

Nat
thanks Nat.....
jhodzzz