重要的类:
TBaseVirtualTree = class(TCustomControl)
TCustomVirtualStringTree = class(TBaseVirtualTree)
TVirtualStringTree = class(TCustomVirtualStringTree)
TCustomVirtualDrawTree = class(TBaseVirtualTree)
TVirtualDrawTree = class(TCustomVirtualDrawTree)
TVTHeader = class(TPersistent)
TCanvasEx = class(TCanvas);
TCollectionItem = class(TPersistent)
TVirtualTreeColumn = class(TCollectionItem)
TCollection = class(TPersistent)
TVirtualTreeColumns = class(TCollection)
半重要的类:
TCustomVirtualTreeOptions = class(TPersistent)
TVirtualTreeOptions = class(TCustomVirtualTreeOptions)
TStringTreeOptions = class(TCustomStringTreeOptions)
TVTEdit = class(TCustomEdit)
EVirtualTreeError = class(Exception);
不重要的类:
TEnumFormatEtc = class(TInterfacedObject, IEnumFormatEtc)
TVTDataObject = class(TInterfacedObject, IDataObject)
TVTDragManager = class(TInterfacedObject, IVTDragManager, IDropSource, IDropTarget)
TVirtualTreeHintWindow = class(THintWindow)
TVTFixedAreaConstraints = class(TPersistent)
TScrollBarOptions = class(TPersistent)
TVTColors = class(TPersistent)
TClipboardFormats = class(TStringList)
TCustomStringTreeOptions = class(TCustomVirtualTreeOptions)
TStringEditLink = class(TInterfacedObject, IVTEditLink)
TCriticalSection = class(TObject)
TWorkerThread = class(TThread)
TWriterHack = class(TFiler)
InternalClipboardFormats.EnumerateFormats(TVirtualTreeClass(ClassType), Formats, FClipboardFormats);
TCustomImageListCast = class(TCustomImageList);
TOLEMemoryStream = class(TCustomMemoryStream)
状态集合:
TVirtualNodeStates = set of TVirtualNodeState;
TVirtualNodeInitStates = set of TVirtualNodeInitState;
TVTColumnOptions = set of TVTColumnOption;
TVTHeaderHitPositions = set of TVTHeaderHitPosition;
THitPositions = set of THitPosition;
TDragOperations = set of TDragOperation;
TMouseButtons = set of TMouseButton;
TVTPaintOptions = set of TVTPaintOption;
TVTAnimationOptions = set of TVTAnimationOption;
TVTAutoOptions = set of TVTAutoOption;
TVTSelectionOptions = set of TVTSelectionOption;
TVTMiscOptions = set of TVTMiscOption;
TVTOperationKinds = set of TVTOperationKind;
TScrollDirections = set of (
TVTDragImageStates = set of (
TVTHeaderOptions = set of TVTHeaderOption;
THeaderStates = set of THeaderState;
THeaderPaintElements = set of (
TVirtualTreeStates = set of (
TChangeStates = set of (
TVTInternalPaintOptions = set of TVTInternalPaintOption;
TScrollUpdateOptions = set of (
TVTStringOptions = set of TVTStringOption;
方法:
ChildCount[Node: PVirtualNode]: Cardinal; // 返回当前节点的子节点数
Expanded[FocusedNode] := True; // 展开某个节点
InvalidateToBottom(FocusedNode); // 刷新当前节点和下面的节点
属性:
RootNodeCount: Cardinal; 赋值后,可立即增加,不需要任何其它额外的语句。