[Overview][Types][Classes][Procedures and functions][Index] | Reference for unit 'ShellCtrls' (#lcl)

# TShellTreeView

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a tree view control to display the files, directories and other objects (such as devices) from the local file system.

## Declaration

Source position: shellctrls.pas line 151

`type TShellTreeView = class(TCustomShellTreeView)`
`published`
`property Align: TAlign;` |  | Specifies the placement of the control on its Parent control.
`property Anchors: TAnchors;` |  | The set of anchor definitions for this control.
`property AutoExpand: Boolean;` |  | Expands a tree node when it is clicked or activated in code.
`property BorderSpacing: TControlBorderSpacing;` |  | Determines the inner and outer border spacing for this control.
`property BackgroundColor: TColor;` |  | Color of the background area on the control.
`property BorderStyle: TBorderStyle;` |  | Indicates the border style displayed around the control.
`property BorderWidth: TBorderWidth;` |  | Width of the Border around the control; default is zero.
`property Color: TColor;` |  | The background color for the control.
`property Constraints: TSizeConstraints;` |  | Contains the minimum and maximum Width and Height for the control.
`property Enabled: Boolean;` |  | Determines whether the control responds to mouse or keyboard input.
`property ExpandCollapseMode: TExpandCollapseMode;`
`property ExpandSignType: TTreeViewExpandSignType;` |  | Sets the drawing style for the expand / collapse (fold/unfold) indicators for tree nodes.
`property Font: TFont;` |  | The font to be used for text display in this control.
`property FileSortType: TFileSortType;` |  | Indicates the sort type used for items (tree nodes) on the tree view control.
`property HideSelection: Boolean;` |  | Indicates if the current selection is hidden when the control loses focus.
`property HotTrack: Boolean;` |  | Enables or disables highlight / underline drawing styles on a tree item when the mouse is hovered over it.
`property Images: TCustomImageList;` |  | Image list which holds icons for the tree nodes in Items.
`property Indent: Integer;` |  | Number of pixels used to indent branch levels (child nodes) on the tree view control.
`property MultiSelectStyle: TMultiSelectStyle;` |  | Multi-selection options enabled for the tree view control.
`property ParentColor: Boolean;` |  | Uses the Color from the Parent control, when enabled.
`property ParentFont: Boolean;` |  | Indicates if the Font from the Parent control is used in the control.
`property ParentShowHint: Boolean;` |  | If True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True.
`property PopupMenu: TPopupMenu;` |  | A context-sensitive menu that pops up when the right mouse button is clicked over this control.
`property ReadOnly: Boolean;` |  | Indicates whether the text (or caption) for tree nodes can be edited in the shell control.
`property RightClickSelect: Boolean;` |  | Right-click also selects tree-item. Else it only calls PopupMenu.
`property Root: string;` |  | Indicates the directory or path which is the top-level node in the tree view.
`property RowSelect: Boolean;` |  | Paints the selection background over the full width of the control for a selected tree node.
`property ScrollBars: TScrollStyle;` |  | Specifies the scroll bars displayed for the tree view control.
`property SelectionColor: TColor;` |  | Color used to paint the background for the selected tree node in the control.
`property ShowButtons: Boolean;` |  | Enables an expand/collapse (fold/unfold) icon for nodes with child nodes.
`property ShowHint: Boolean;` |  | Enables Hint display for the control.
`property ShowLines: Boolean;` |  | Enables or disables the horizontal and vertical lines which join nodes in the tree hierarchy.
`property ShowRoot: Boolean;` |  | Enables or disables drawing the root node for the tree view control.
`property StateImages: TCustomImageList;` |  | Image list with the bitmaps used to represent the state for nodes in the tree.
`property TabOrder: TTabOrder;` |  | Indicates the navigation order for the control when the user presses the Tab or Shift+Tab key.
`property TabStop: Boolean;` |  | Enables navigation using the Tab key.
`property Tag;` |  | Tag value for the component.
`property ToolTips: Boolean;` |  | Indicates whether tool tips (hints) are enabled for nodes on the tree view control.
`property Visible: Boolean;` |  | Allows the control, and all of its children, to be displayed or hidden.
`property Options: TTreeViewOptions;` |  | The set of options enabled in the tree view control.
`property TreeLineColor: TColor;` |  | Color used to draw the lines which connect the nodes in the tree.
`property TreeLinePenStyle: TPenStyle;` |  | Style of the TPen used to draw lines used to connect nodes in the control.
`property ExpandSignColor: TColor;` |  | Color used to paint expand / collapse (fold / unfold) indicators for tree nodes.
`property ObjectTypes: TObjectTypes;` |  | Indicates the file system objects displayed using the control.
`property ShellListView: TCustomShellListView;` |  | Connects this ShellTreeView to a ShellListView.
`property OnAddItem: TAddItemEvent;` |  | Event handler signalled when an item (tree node) is added to the shell control.
`property OnAdvancedCustomDraw: TTVAdvancedCustomDrawEvent;` |  | Event handler signalled to custom draw the grid control using drawing stages.
`property OnAdvancedCustomDrawItem: TTVAdvancedCustomDrawItemEvent;` |  | OnAdvancedCustomDrawItem - event handler for advanced custom drawing item.
`property OnChange: TTVChangedEvent;` |  | Event handler for a change notification in the tree view control.
`property OnChanging: TTVChangingEvent;` |  | Event handler signalled before the selected node in the tree view control is changed.
`property OnClick: TNotifyEvent;` |  | Notification handler for mouse clicks.
`property OnCollapsed: TTVExpandedEvent;` |  | Event handler signalled when a tree node has been collapsed on the control.
`property OnCollapsing: TTVCollapsingEvent;` |  | Event handler signalled prior to collapsing a node on the tree view control.
`property OnCustomDraw: TTVCustomDrawEvent;` |  | Event handler signalled to perform custom drawing for the tree view control.
`property OnCustomDrawItem: TTVCustomDrawItemEvent;` |  | Event handler signalled to custom draw an item (tree node) on the control.
`property OnDblClick: TNotifyEvent;` |  | Event handler signalled when a mouse double click occurs in the control.
`property OnEdited: TTVEditedEvent;` |  | Event handler signalled when the tree view control has been edited.
`property OnEditing: TTVEditingEvent;` |  | Event handler signalled to determine whether the editor can be enabled for a tree node.
`property OnEnter: TNotifyEvent;` |  | Event handler signalled when the control receives focus.
`property OnExit: TNotifyEvent;` |  | Event handler signalled when the control loses focus.
`property OnExpanded: TTVExpandedEvent;` |  | Event handler signalled when a node on the tree view control has been expanded.
`property OnExpanding: TTVExpandingEvent;` |  | Event handler signalled prior to expanding a node on the tree view control.
`property OnGetImageIndex: TTVExpandedEvent;` |  | Event handler signalled to get the ordinal position for the image displayed on a tree node.
`property OnGetSelectedIndex: TTVExpandedEvent;` |  | Event handler signalled to get the ordinal position for the image displayed for a selected node on the tree view control.
`property OnHasChildren: TTVHasChildrenEvent;` |  | Event handler signalled to determine if a given node in the tree view has child nodes.
`property OnKeyDown: TKeyEvent;` |  | Event handler signalled for key down keyboard events.
`property OnKeyPress: TKeyPressEvent;` |  | Event handler signalled for character data entered by the user.
`property OnKeyUp: TKeyEvent;` |  | Event handler signalled when a key up event has occurred for the control.
`property OnMouseDown: TMouseEvent;` |  | Event handler signalled when a mouse down event is handled for the control.
`property OnMouseEnter: TNotifyEvent;` |  | Event handler signalled when the mouse pointer has entered the control.
`property OnMouseLeave: TNotifyEvent;` |  | Event handler signalled when the mouse pointer has left the control.
`property OnMouseMove: TMouseMoveEvent;` |  | Event handler signalled when the mouse pointer is moved in the control.
`property OnMouseUp: TMouseEvent;` |  | Event handler signalled when a mouse up event is handled for the control.
`property OnMouseWheel: TMouseWheelEvent;` |  | Event handler for mouse wheel turned.
`property OnMouseWheelDown: TMouseWheelUpDownEvent;` |  | Event handler signalled for a downward movement of the mouse wheel.
`property OnMouseWheelUp: TMouseWheelUpDownEvent;` |  | Event handler signalled for an upward movement of the mouse wheel.
`property OnMouseWheelHorz: TMouseWheelEvent;` |  | Event handler signalled for a horizontal movement of the mouse wheel.
`property OnMouseWheelLeft: TMouseWheelUpDownEvent;` |  | Event handler signalled for a leftward movement of the mouse wheel.
`property OnMouseWheelRight: TMouseWheelUpDownEvent;` |  | Event handler signalled for a rightward movement of the mouse wheel.
`property OnSelectionChanged: TNotifyEvent;` |  | Event handler signalled when the selection in the tree view control is changed.
`property OnShowHint: TControlShowHintEvent;` |  | Event handler signalled when a hint window is displayed for the control.
`property OnSortCompare: TFileItemCompareEvent;` |  | Event handler signalled to compare file items in a custom sort routine.
`property OnUTF8KeyPress: TUTF8KeyPressEvent;` |  | Handler for a character entered by the user.
`end;`

## Inheritance

`TShellTreeView` |  | Implements a tree view control to display the files, directories and other objects (such as devices) from the local file system.
`TCustomShellTreeView` |  | The base class for a tree view control used to display files, directories and other objects (such as devices) from the local file system.
`TCustomTreeView` |  | The base class for TTreeView.
`TCustomControl` |  | The base class for windowed controls which paint themselves.
`TWinControl` |  | Implements a windowed control which can contain other child controls.
`TControl` |  | The base class for visible controls.
`TLCLComponent` |  | The base class for LCL components which have an associated widget.
`TComponent`
?
`TObject`

## Description

TShellTreeView is a TCustomShellTreeView descendant that implements a tree view used to display files, directories, and other objects (such as devices) from the local file system. TShellTreeView provides a hierarchical tree view for the file system objects, and is used to navigate between items in the control.

TShellTreeView sets the visibility for properties, methods, and events defined in the ancestor class.

## See also

TCustomShellTreeView |  | The base class for a tree view control used to display files, directories and other objects (such as devices) from the local file system.