Sign in Join
FPDoc Onlineexperiment

TTreeView class

In unit ComCtrls

TTreeView is a control that displays a hierarchical list of items.

Declaration

pascal
TTreeView = class(TCustomTreeView)

Inheritance

  1. TTreeView
  2. TCustomTreeView
  3. TCustomControl
  4. TWinControl
  5. TControl
  6. TLCLComponent
  7. TComponent
  8. TPersistent
  9. TObject

Description

Use a TTreeView to display a hierarchical list of items. Items are shown by their caption and an optional bitmap.

See also

Properties

PathDelimiterpublicDelimiter used to separate node identifiers in the path to a given tree node.
ScrolledLeftpublicHorizontal coordinate for the origin of the visible display area.
ScrolledToppublicVertical coordinate for the origin of the visible display area.
AlignpublishedSpecifies the placement of the control on its Parent control.
AnchorspublishedThe set of anchor definitions for this control.
AutoExpandpublishedExpands a tree node when it is clicked or activated in code.
BorderSpacingpublishedDetermines the inner and outer border spacing for this control.
BackgroundColorpublishedColor of the background area on the control.
BorderStylepublishedIndicates the border style displayed around the control.
BorderWidthpublishedWidth of the Border around the control; default is zero.
ColorpublishedThe background color for the control.
ConstraintspublishedContains the minimum and maximum Width and Height for the control.
DefaultItemHeightpublishedDefault height for tree nodes in the control.
DisabledFontColorpublishedFont color used for a tree node when the tree view or the node is not enabled.
DragKindpublishedIndicates the action performed for a drag operation: drag-and-drop or drag-and-dock.
DragCursorpublishedThe cursor shape shown during a drag operation.
DragModepublishedDetermines how a drag operation is started for the control.
EnabledpublishedDetermines whether the control responds to mouse or keyboard input.
ExpandSignColorpublishedColor used to paint expand / collapse (fold / unfold) indicators for tree nodes.
ExpandSignSizepublishedSize of the expand / collapse (fold / unfold) indicators for tree nodes.
ExpandSignTypepublishedSets the drawing style for the expand / collapse (fold/unfold) indicators for tree nodes.
FontpublishedThe font to be used for text display in this control.
HideSelectionpublishedIndicates if the highlighting for current selection(s) are hidden when the control loses focus.
HotTrackpublishedEnables or disables highlight / underline drawing styles on a tree item when the mouse is hovered over it.
HotTrackColorpublishedFont color used to draw the text on a hovered tree node when hot tracking is enabled.
ImagespublishedImage list which holds icons for the tree nodes in Items.
ImagesWidthpublishedWidth for the Images used in the tree view control.
IndentpublishedNumber of pixels used to indent branch levels (child nodes) on the tree view control.
MultiSelectpublishedEnables or disables selection of multiple tree nodes at the same time.
MultiSelectStylepublishedMulti-selection options enabled for the tree view control.
ParentColorpublishedUse the Color from the Parent control, when enabled.
ParentFontpublishedIndicates if the Font from the Parent control is used in the control.
ParentShowHintpublishedIf True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True.
PopupMenupublishedA context-sensitive menu that pops up when the right mouse button is clicked over this control.
ReadOnlypublishedIndicates whether the text (or caption) for tree nodes can be edited in the control.
RightClickSelectpublishedRight-click also selects tree-item. Else it only calls PopupMenu.
RowSelectpublishedPaints the selection background over the full width of the control for a selected tree node.
ScrollBarspublishedSpecifies the scroll bars displayed for the tree view control.
SelectionColorpublishedColor used to paint the background for the selected tree node in the control.
SelectionFontColorpublishedColor used to draw the text for a (multi-)selected item when enabled.
SelectionFontColorUsedpublishedIndicates if the selection font color is used for selected items.
SeparatorColorpublishedColor used to paint horizontal lines between tree nodes when enabled.
ShowButtonspublishedEnables an expand/collapse (fold/unfold) icon for nodes with child nodes.
ShowHintpublishedEnables Hint display for the control.
ShowLinespublishedEnables or disables the horizontal and vertical lines which join nodes in the tree hierarchy.
ShowRootpublishedEnables or disables drawing the root node for the tree view control.
ShowSeparatorspublishedIndicates whether horizontal separator lines are drawn between nodes on the tree view control.
SortTypepublishedAllows items to be sorted by caption, by the Data property, or both.
StateImagespublishedImage list with the bitmaps used to represent the state for nodes in the tree.
StateImagesWidthpublishedWidth for the bitmaps in the StateImages property.
TabOrderpublishedIndicates the navigation order for the control when the user presses the Tab or Shift+Tab key.
TabStoppublishedEnables or disables navigation using the Tab key.
TagpublishedTag value of the component.
ToolTipspublishedIndicates whether tool tips (hints) are enabled for nodes on the tree view control.
VisiblepublishedAllows the control, and all of its children, to be displayed or hidden.
OptionspublishedThe set of options enabled in the tree view control.
ItemspublishedThe container with the TTreeNode instances for the control.
TreeLineColorpublishedColor used to draw the lines which connect the nodes in the tree.
TreeLinePenStylepublishedStyle of the TPen used to draw lines used to connect nodes in the control.

Events

OnAdditionpublishedEvent handler signalled when a tree node is added to the Items in the tree view control.
OnAdvancedCustomDrawpublishedEvent handler signalled to custom draw the grid control using drawing stages.
OnAdvancedCustomDrawItempublishedOnAdvancedCustomDrawItem - event handler for advanced custom drawing item.
OnChangepublishedEvent handler for a change notification in the tree view control.
OnChangingpublishedEvent handler signalled before the selected node in the tree view control is changed.
OnClickpublishedNotification handler for mouse clicks.
OnCollapsedpublishedEvent handler signalled when a tree node has been collapsed on the control.
OnCollapsingpublishedEvent handler signalled prior to collapsing a node on the tree view control.
OnComparepublishedEvent handler signalled to compare and sort tree nodes in their default order.
OnContextPopuppublishedInvoked when a context-sensitive pop-up menu is requested.
OnCreateNodeClasspublishedEvent handler signalled to get the class reference used to create new tree nodes.
OnCustomCreateItempublishedOnCustomCreateItem - event handler for custom item creation.
OnCustomDrawpublishedEvent handler signalled to perform custom drawing for the tree view control.
OnCustomDrawItempublishedEvent handler signalled to custom draw an item (tree node) on the control.
OnCustomDrawArrowpublishedEvent handler signalled to custom draw expand / collapse (fold) indicators for a tree node.
OnDblClickpublishedEvent handler signalled when a mouse double click occurs in the control.
OnDeletionpublishedEvent handler signalled when a node is deleted from the node tree.
OnDragDroppublishedEvent handler signalled when an object is dropped onto the control.
OnDragOverpublishedEvent handler signalled when a control is dragged over the control instance.
OnEditedpublishedEvent handler signalled when the tree view control has been edited.
OnEditingpublishedEvent handler signalled to determine whether the editor can be enabled for a tree node.
OnEditingEndpublishedEvent handler signalled when EndEditing is called for the control.
OnEndDragpublishedEvent handler signalled for the end of a drag-drop operation.
OnEnterpublishedEvent handler signalled when the control receives focus.
OnExitpublishedEvent handler signalled when the control loses focus.
OnExpandedpublishedEvent handler signalled when a node on the tree view control has been expanded.
OnExpandingpublishedEvent handler signalled prior to expanding a node on the tree view control.
OnGetImageIndexpublishedEvent handler signalled to get the ordinal position for the image displayed on a tree node.
OnGetSelectedIndexpublishedEvent handler signalled to get the ordinal position for the image displayed for a selected node on the tree view control.
OnHasChildrenpublishedEvent handler signalled to determine if a given node in the tree view has child nodes.
OnKeyDownpublishedEvent handler signalled for key down keyboard events.
OnKeyPresspublishedEvent handler signalled for character data entered by the user.
OnKeyUppublishedEvent handler signalled when a key up event has occurred for the control.
OnMouseDownpublishedEvent handler signalled when a mouse down event is handled for the control.
OnMouseEnterpublishedEvent handler signalled when the mouse pointer has entered the control.
OnMouseLeavepublishedEvent handler signalled when the mouse pointer has left the control.
OnMouseMovepublishedEvent handler signalled when the mouse pointer is moved in the control.
OnMouseUppublishedEvent handler signalled when a mouse up event is handled for the control.
OnMouseWheelpublishedEvent handler for mouse wheel turned.
OnMouseWheelDownpublishedEvent handler signalled for a downward movement of the mouse wheel.
OnMouseWheelUppublishedEvent handler signalled for an upward movement of the mouse wheel.
OnMouseWheelHorzpublishedEvent handler signalled for a horizontal movement of the mouse wheel.
OnMouseWheelLeftpublishedEvent handler signalled for a leftward movement of the mouse wheel.
OnMouseWheelRightpublishedEvent handler signalled for a rightward movement of the mouse wheel.
OnNodeChangedpublishedEvent handler signalled when the text for a tree node has been changed.
OnResizepublishedNotification handler for a resize of the control.
OnSelectionChangedpublishedEvent handler signalled when the selection in the tree view control is changed.
OnShowHintpublishedEvent handler signalled when a hint window is displayed for the control.
OnStartDragpublishedEvent handler signalled for the start of a dragging operation.
OnUTF8KeyPresspublishedHandler for a character entered by the user.

Inherited

From TCustomTreeView (143)

AccessibilityOn Added AlphaSort ApplyStoredSelection BeginAutoDrag BeginEditing BeginUpdate BottomItem CanChange CanCollapse CanEdit CanExpand Change ClearInvisibleSelection ClearSelection Click Collapse ConsistencyCheck Create CreateNode CreateNodes CreateWnd CustomDraw CustomDrawItem CustomSort DblClick DefaultItemHeightIsStored DefaultTreeViewSort Delete Destroy DestroyWnd DoAutoAdjustLayout DoCreateNodeClass DoDragMsg DoEndDrag DoMouseWheel DoMouseWheelHorz DoPaint DoPaintNode DoSelectionChanged DoStartDrag DragOver DrawBuiltinIcon DropTarget EditingItem EditorEditingDone EditorKeyDown EndEditing EndUpdate EnsureNodeIsVisible EraseBackground Expand ExpandSignSizeIsStored ExpandSignWidth FullCollapse FullExpand GetBuiltinIconSize GetChildAccessibleObjectAtPos GetControlClassDefaultSize GetDragImages GetFirstMultiSelected GetHitTestInfoAt GetImageIndex GetImageSize GetInsertMarkAt GetLastMultiSelected GetMaxLvl GetMaxScrollLeft GetMaxScrollTop GetNodeAt GetNodeAtY GetNodeDrawAreaHeight GetNodeDrawAreaWidth GetNodeWithExpandSignAt GetSelectedChildAccessibleObject GetSelectedIndex IndentIsStored InitializeWnd InsertMarkNode InsertMarkType Invalidate IsCustomDrawn IsEditing IsInsertMarkVisible IsNodeHeightFullVisible IsNodeVisible KeepCollapsedNodes KeyDown Loaded LoadFromFile LoadFromStream LockSelectionChangeEvent MakeSelectionVisible MouseDown MouseLeave MouseMove MouseUp MoveCollapse MoveEnd MoveExpand MoveHome MoveLeft MovePageDown MovePageUp MoveRight MoveSelection MoveToNextNode MoveToPrevNode NodeChanged NodeHasChildren Notification Paint QuadClick Resize SaveToFile SaveToStream ScrollView Select Selected SelectionCount SelectionIsHidden Selections SelectionVisible SetDragMode SetInsertMark SetInsertMarkAt SetOptions States StoreCurrentSelection TFindOption TFindOptions TopItem TripleClick UnlockSelectionChangeEvent UpdateDefaultItemHeight UpdateInsertMark WMHScroll WMKillFocus WMLButtonDown WMSetFocus WMVScroll WriteDebugReport WSRegisterClass

From TCustomControl (6)

Canvas FontChanged OnPaint PaintWindow SetColor WMPaint

From TWinControl (219)

AddControl AdjustClientRect AlignControls AllAutoSized AutoAdjustLayout AutoSizeDelayed AutoSizeDelayedHandle AutoSizeDelayedReport AutoSizePhases BeginUpdateBounds BoundsLockCount BroadCast Brush BrushCreated CachedClientHeight CachedClientWidth CalculatePreferredSize CanFocus CanSetFocus CanTab ChangeScale ChildClassAllowed ChildHandlesCreated ChildKey ChildSizing ClientRectNeedsInterfaceUpdate CMBiDiModeChanged CMBorderChanged CMDoubleBufferedChanged CMEnabledChanged CMEnter CMExit CMParentDoubleBufferedChanged CMShowHintChanged CMShowingChanged CMVisibleChanged CNChar CNKeyDown CNKeyUp CNSysKeyDown CNSysKeyUp ContainsControl ControlAtPos ControlCount ControlKeyDown ControlKeyUp Controls ControlsAligned CreateBrush CreateDockManager CreateHandle CreateParams CreateParented CreateParentedControl CreateSubClass CustomAlignInsertBefore CustomAlignPosition DefaultHandler DefWndProc DesignerDeleting DestroyHandle DialogChar DisableAlign DoAddDockClient DoAdjustClientRectChange DoAlignChildControls DoAllAutoSize DoAutoSize DoChildSizingChange DockClientCount DockClients DockDrop DockManager DockOver DockSite DoConstraintsChange DoDockClientMsg DoDockOver DoEnter DoExit DoFlipChildren DoFloatMsg DoGetDockCaption DoKeyDownBeforeInterface DoKeyPress DoKeyUpBeforeInterface DoRemainingKeyDown DoRemainingKeyUp DoRemoveDockClient DoSendBoundsToInterface DoSendShowHideToInterface DoSetBounds DoubleBuffered DoUnDock DoUndockClientMsg DoUTF8KeyPress EnableAlign EndUpdateBounds FinalizeWnd FindChildControl FindNextControl FixDesignFontsPPIWithChildren FixupTabList FlipChildren Focused FormEndUpdated GetAdjustedLogicalClientRect GetBorderStyle GetChildren GetChildrenRect GetClientOrigin GetClientRect GetControlIndex GetControlOrigin GetDeviceContext GetDockCaption GetEnumeratorControls GetEnumeratorControlsReverse GetMouseCapture GetParentHandle GetPreferredSizeClientFrame GetSiteInfo GetTabOrderList GetTextLen GetTopParentHandle Handle HandleAllocated HandleNeeded InsertControl IntfGetDropFilesTarget IntfUTF8KeyPress InvalidateBoundsRealized InvalidateClientRectCache InvalidatePreferredChildSizes IsClientHeightStored IsClientWidthStored IsControlMouseMsg IsFlipped IsResizing IsSpecialSubControl KeyDownAfterInterface KeyDownBeforeInterface KeyPress KeyUp KeyUpAfterInterface KeyUpBeforeInterface LockRealizeBounds MainWndProc NotifyControls OnAlignInsertBefore OnAlignPosition OnDockDrop OnDockOver OnGetDockCaption OnGetSiteInfo OnUnDock PaintControls PaintHandler PaintTo ParentDoubleBuffered ParentFormHandleInitialized ParentHandlesAllocated ParentWindow PerformTab RealGetText ReAlign RealizeBounds RealizeBoundsRecursive RealSetText ReloadDockedControl RemoveControl RemoveFocus Repaint ScaleBy ScaleControls ScrollBy ScrollBy_WS SelectFirst SelectNext SendDialogChar SendMoveSizeMessages SetBorderStyle SetBounds SetChildZPosition SetControlIndex SetDockManager SetFocus SetShape SetTempCursor ShowControl Showing UnlockRealizeBounds Update UpdateControlState UpdateDockCaption UpdateShowing UseDockManager UTF8KeyPress VisibleDockClientCount WindowHandle WMChar WMContextMenu WMDestroy WMEnter WMEraseBkgnd WMExit WMKeyDown WMKeyUp WMMove WMNotify WMShowWindow WMSize WMSysChar WMSysKeyDown WMSysKeyUp WMWindowPosChanged WndProc WriteLayoutDebugReport WSSetText

From TControl (308)

AccessibleDescription AccessibleName AccessibleRole AccessibleValue Action ActionChange ActionLink ActiveDefaultControlChanged AddHandler AddHandlerOnBeforeDestruction AddHandlerOnChangeBounds AddHandlerOnEnabledChanged AddHandlerOnEnabledChanging AddHandlerOnKeyDown AddHandlerOnMouseWheel AddHandlerOnResize AddHandlerOnVisibleChanged AddHandlerOnVisibleChanging AdjustSize AnchorAsAlign AnchorClient AnchoredControlCount AnchoredControls AnchorHorizontalCenterTo AnchorParallel AnchorSame AnchorSide AnchorSideBottom AnchorSideChanged AnchorSideLeft AnchorSideRight AnchorSideTop AnchorToCompanion AnchorToNeighbour AnchorVerticalCenterTo AssignTo AutoSize AutoSizing AutoSizingAll AutoSizingLockCount BaseBounds BaseParentClientSize BeforeDestruction BeforeDragStart BeginAutoSizing BeginDrag BiDiMode BoundsChanged BoundsRect BoundsRectForNewParent BringToFront CalculateDockSizes CanAutoSize Caption CaptureChanged CaptureMouseButtons ChangeBounds Changed CheckChildClassAllowed CheckNewParent CheckOnChangeBounds ClientHeight ClientOrigin ClientRect ClientToParent ClientToScreen ClientWidth CMChanged CMCursorChanged CMHintShow CMHitTest CMMouseEnter CMMouseLeave CMParentBiDiModeChanged CMParentColorChanged CMParentFontChanged CMParentShowHintChanged CMSysFontChanged CMTextChanged CNPreferredSizeChanged ColorIsStored ConstrainedResize ControlFontClass ControlOrigin ControlState ControlStyle ControlToScreen CreateAccessibleObject CreateControlBorderSpacing CreateFloatingDockSite Cursor DefineProperties DesktopFont DisableAutoSizing DoBorderSpacingChange DoCallKeyEventHandler DoCallMouseWheelEventHandler DoCallNotifyHandler Dock Docked DockOrientation DockTrackNoTarget DoContextPopup DoDock DoEndDock DoFixDesignFontPPI DoMouseDown DoMouseUp DoMouseWheelDown DoMouseWheelLeft DoMouseWheelRight DoMouseWheelUp DoOnChangeBounds DoOnParentHandleDestruction DoOnResize DoOnShowHint DoScaleFontPPI DoStartDock DragCanceled DragDrop Dragging EditingDone EnableAutoSizing EnabledChanged EnabledChanging EndAutoSizing EndDrag ExecuteCancelAction ExecuteDefaultAction FindSubComponent FixDesignFontsPPI Floating FloatingDockSiteClass ForeignAnchorSideChanged FormIsUpdating GetAccessibleObject GetAction GetActionLinkClass GetAnchorsDependingOnParent GetCachedText GetCanvasScaleFactor GetClientScrollOffset GetColorResolvingParent GetCursor GetDefaultColor GetDefaultDockCaption GetDefaultHeight GetDefaultWidth GetDockEdge GetEnabled GetFloating GetFloatingDockSiteClass GetLogicalClientRect GetMousePosFromMessage GetPalette GetParentBackground GetParentComponent GetPopupMenu GetPreferredSize GetRGBColorResolvingParent GetScrolledClientRect GetSidePosition GetTextBuf GetTopParent HandleObjectShouldBeVisible HasHelp HasParent Height HeightIsAnchored HelpContext HelpKeyword HelpType Hide Hint HostDockSite InitiateAction InvalidateControl InvalidatePreferredSize IsAParentAligning IsBorderSpacingInnerBorderStored IsCaptionStored IsControl IsControlVisible IsEnabled IsParentColor IsParentFont IsParentOf IsProcessingPaintMsg IsRightToLeft IsVisible Left LMCaptureChanged LoadedAll LRDockWidth ManualDock ManualFloat MouseCapture MouseEnter MouseInClient OnChangeBounds OnConstrainedResize OnEditingDone OnEndDock OnQuadClick OnStartDock OnTripleClick Parent ParentBackground ParentBiDiMode ParentDestroyingHandle ParentFontChanged ParentToClient Perform PositionDockRect ReadBounds ReadState Refresh RemoveAllHandlersOfObject RemoveHandler RemoveHandlerOnBeforeDestruction RemoveHandlerOnChangeBounds RemoveHandlerOnEnabledChanged RemoveHandlerOnEnabledChanging RemoveHandlerOnKeyDown RemoveHandlerOnMouseWheel RemoveHandlerOnResize RemoveHandlerOnVisibleChanged RemoveHandlerOnVisibleChanging ReplaceDockedControl RequestAlign Scale96ToFont Scale96ToForm Scale96ToScreen ScaleConstraints ScaleDesignToForm ScaleFontsPPI ScaleFontTo96 ScaleFontToScreen ScaleFormTo96 ScaleFormToDesign ScaleScreenTo96 ScaleScreenToFont ScreenToClient ScreenToControl SendToBack SessionProperties SetAction SetAlign SetAnchors SetAutoSize SetBiDiMode SetBoundsKeepBase SetCursor SetEnabled SetHint SetInitialBounds SetName SetParent SetParentBackground SetParentBiDiMode SetParentComponent SetTextBuf SetVisible SetZOrder ShouldAutoAdjust Show ShowHelp TBDockHeight Text TextChanged Top UndockHeight UndockWidth UpdateAnchorRules UpdateBaseBounds UpdateMouseCursor UpdateRolesForForm UseRightToLeftAlignment UseRightToLeftReading UseRightToLeftScrollBar VisibleChanged VisibleChanging Width WidthIsAnchored WindowProc WMCancelMode WMLButtonDBLCLK WMLButtonQuadCLK WMLButtonTripleCLK WMLButtonUp WMMButtonDBLCLK WMMButtonDown WMMButtonQuadCLK WMMButtonTripleCLK WMMButtonUp WMMouseHWheel WMMouseMove WMMouseWheel WMRButtonDBLCLK WMRButtonDown WMRButtonQuadCLK WMRButtonTripleCLK WMRButtonUp WMXButtonDBLCLK WMXButtonDown WMXButtonQuadCLK WMXButtonTripleCLK WMXButtonUp

From TLCLComponent (6)

DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance WidgetSetClass

From TComponent (63)

_AddRef _Release CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetTypeInfo GetTypeInfoCount iicrGetComponent InsertComponent Invoke IsImplementorOf Loading Name ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetSubComponent ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (4)

Assign FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (35)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.