虚拟字符串树可能看起来像这样吗?
我真的需要帮助,因为我是德尔福的新手。
答案 0 :(得分:1)
您可以在OnBeforeCellPaint
事件中添加一些内容。例如:
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;
会给你粗略的近似图片中的内容......
N - [