2424interface
2525
2626uses
27- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
28- VirtualTrees, StdCtrls, { $ifdef GraphicEx} GraphicEx, { $else} JPEG, { $endif}
29- ImgList, ComCtrls, UITypes, VirtualTrees.DrawTree, System.ImageList, VirtualTrees.Types;
27+ Winapi.Windows, Winapi.Messages, System.SysUtils, System.Classes,
28+ Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
29+ VirtualTrees, Vcl.StdCtrls,
30+ { $ifdef GraphicEx} GraphicEx, { $else} Vcl.Imaging.JPEG, { $endif}
31+ Vcl.ImgList, Vcl.ComCtrls, System.UITypes, VirtualTrees.DrawTree,
32+ System.ImageList, VirtualTrees.Types, VirtualTrees.BaseAncestorVCL,
33+ VirtualTrees.BaseTree, VirtualTrees.AncestorVCL;
3034
3135type
3236 TDrawTreeForm = class (TForm)
@@ -46,7 +50,7 @@ TDrawTreeForm = class(TForm)
4650 procedure VDT1GetImageIndex (Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex;
4751 var Ghosted: Boolean; var Index: TImageIndex);
4852 procedure VDT1GetNodeWidth (Sender: TBaseVirtualTree; Canvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
49- var NodeWidth: Integer );
53+ var NodeWidth: TDimension );
5054 procedure VDT1HeaderClick (Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
5155 procedure VDT1InitChildren (Sender: TBaseVirtualTree; Node: PVirtualNode; var ChildCount: Cardinal);
5256 procedure VDT1InitNode (Sender: TBaseVirtualTree; ParentNode, Node: PVirtualNode;
@@ -484,7 +488,7 @@ procedure TDrawTreeForm.VDT1DrawNode(Sender: TBaseVirtualTree; const PaintInfo:
484488// ----------------------------------------------------------------------------------------------------------------------
485489
486490procedure TDrawTreeForm.VDT1GetNodeWidth (Sender: TBaseVirtualTree; Canvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
487- var NodeWidth: Integer );
491+ var NodeWidth: TDimension );
488492
489493// Since the draw tree does not know what is in a cell, we have to return the width of the content (not the entire
490494// cell width, this could be determined by the column width).
0 commit comments