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

TTreeView

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

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

Declaration

Source position: comctrls.pp line 3741

type TTreeView = class(TCustomTreeView)

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;

  

Unfold a tree-item when user clicks it or an item activated by code.

  property BorderSpacing: TControlBorderSpacing;

  

Determines the inner and outer border spacing for this control.

  property BackgroundColor: TColor;

  

Color of background area of 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 of the control.

  property Constraints: TSizeConstraints;

  

Contains the minimum and maximum Width and Height for the control.

  property DefaultItemHeight: Integer;

  

Default height for tree nodes in the control.

  property DisabledFontColor: TColor;

  

Font color used for tree nodes when the tree view is not enabled.

  property DragKind: TDragKind;

  

The operation when the control is dragged - Drag or Dock.

  property DragCursor: TCursor;

  

The cursor shape shown while the control is dragged.

  property DragMode: TDragMode;

  

Allows the user to drag the control.

  property Enabled: Boolean;

  

Determines whether the control reacts on mouse or keyboard input.

  property ExpandSignColor: TColor;

  

Color used to paint expand/collapse (fold/unfold) symbol (i.e. plus/minus symbol).

  property ExpandSignSize: Integer;

  

Size of expand/collapse (fold/unfold) symbol.

  property ExpandSignType: TTreeViewExpandSignType;

  

Sets the shape for the expand/collapse (fold/unfold) symbols.

  property Font: TFont;

  

The font to be used for text display in this control.

  property HideSelection: Boolean;

  

Indicates if the current Selection is hidden when the control loses focus.

  property HotTrack: Boolean;

  

Additionally highlight/underline tree-item when mouse is over it.

  property HotTrackColor: TColor;

  

Font color used for the text in a tree node when hot tracking is enabled.

  property Images: TCustomImageList;

  

Image list which holds icons for the tree nodes in Items.

  property ImagesWidth: Integer;

  

Width for the Images used in the tree view control.

  property Indent: Integer;

  

Size in pixels by which each nested branching level is to be indented.

  property MultiSelect: Boolean;

  

Enables or disables selection of several tree-items at one time.

  property MultiSelectStyle: TMultiSelectStyle;

  

Additional options for the MultiSelect property.

  property ParentColor: Boolean;

  

  property ParentFont: Boolean;

  

If True, the Font of the control will be the same as the one from the Parent. Default is True.

  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 control.

  property RightClickSelect: Boolean;

  

Right-click also selects tree-item. Else it only calls PopupMenu.

  property RowSelect: Boolean;

  

When a tree-item is selected, paint selection background with full width.

  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 SelectionFontColor: TColor;

  

Color used to draw the text for a selected item.

  property SelectionFontColorUsed: Boolean;

  

Indicates if the selection font color is used for selected items.

  property SeparatorColor: TColor;

  

Color used to paint horizontal lines between tree nodes when enabled.

  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 the horizontal and vertical lines which join nodes in the tree hierarchy.

  property ShowRoot: Boolean;

  

Enables drawing of the root node indicator for the tree view control.

  property SortType: TSortType;

  

Allow to show items sorted: by caption, by Data property or both.

  property StateImages: TCustomImageList;

  

Image list with the bitmaps used to represent the state for nodes in the tree.

  property StateImagesWidth: Integer;

  

Width for the bitmaps in the StateImages property.

  property TabOrder: TTabOrder;

  

Indicates the navigation order for the control when the user presses the Tab or Shift+Tab key.

  property TabStop: Boolean;

  

Enables or disables navigation using the Tab key.

  property Tag;

  property ToolTips: Boolean;

  

Show tooltip (hint) for a tree-item when the item is too long to fit by width and mouse is over it.

  property Visible: Boolean;

  

Allows the control, and all of its children, to be displayed or hidden.

  property OnAddition: TTVExpandedEvent;

  

Event handler signalled when a tree node is added to the tree node Items in the control.

  property OnAdvancedCustomDraw: TTVAdvancedCustomDrawEvent;

  

OnAdvancedCustomDraw - event handler for advanced custom drawing.

  property OnAdvancedCustomDrawItem: TTVAdvancedCustomDrawItemEvent;

  

OnAdvancedCustomDrawItem - event handler for advanced custom drawing item.

  property OnChange: TTVChangedEvent;

  

OnChange - specialized event handler for a change in the TreeView.

  property OnChanging: TTVChangingEvent;

  

OnChanging - specialized event handler while TreeView is being changed.

  property OnClick: TNotifyEvent;

  

Notification handler for mouse clicks.

  property OnCollapsed: TTVExpandedEvent;

  

OnCollapsed - specialized event handler when part of the tree is collapsed.

  property OnCollapsing: TTVCollapsingEvent;

  

OnCollapsing - specialized event handler while part of the tree is being collapsed.

  property OnCompare: TTVCompareEvent;

  

OnCompare - specialized event handler for comparisons within the TreeView.

  property OnContextPopup: TContextPopupEvent;

  

Invoked when a context-sensitive pop-up menu is requested.

  property OnCreateNodeClass: TTVCreateNodeClassEvent;

  

Event handler signalled to get the class reference used to create new tree nodes.

  property OnCustomCreateItem: TTVCustomCreateNodeEvent;

  

OnCustomCreateItem - event handler for custom item creation.

  property OnCustomDraw: TTVCustomDrawEvent;

  

OnCustomDraw - event handler for custom drawing.

  property OnCustomDrawItem: TTVCustomDrawItemEvent;

  

OnCustomDrawItem - event handler for custom drawing item.

  property OnCustomDrawArrow: TTVCustomDrawArrowEvent;

  

Event handler signalled to custom draw expand or collapse indicators.

  property OnDblClick: TNotifyEvent;

  

Event Handler for double mouse clicks.

  property OnDeletion: TTVExpandedEvent;

  

Event handler signalled when a node is deleted from the node tree.

  property OnDragDrop: TDragDropEvent;

  

This handler determines the action on an drop onto this control, in a drag-drop operation.

  property OnDragOver: TDragOverEvent;

  

Event handler for a control being dragged over this control.

  property OnEdited: TTVEditedEvent;

  

OnEdited - specialized event handler when the TreeView has been edited.

  property OnEditing: TTVEditingEvent;

  

OnEditing - specialized event handler while a TreeView is being edited.

  property OnEditingEnd: TTVEditingEndEvent;

  

Event handler signalled when EndEditing is called for the control.

  property OnEndDrag: TEndDragEvent;

  

Notification handler for the end of a drag operation.

  property OnEnter: TNotifyEvent;

  

Handler for control receiving the focus.

  property OnExit: TNotifyEvent;

  

Handler for control loosing the focus; This is a good place for checking the finished user input.

  property OnExpanded: TTVExpandedEvent;

  

OnExpanded - specialized event handler when a TreeView has been expanded.

  property OnExpanding: TTVExpandingEvent;

  

OnExpanding - specialized event handler while a TreeView is being expanded.

  property OnGetImageIndex: TTVExpandedEvent;

  

OnGetImageIndex - event handler for finding the index of an image.

  property OnGetSelectedIndex: TTVExpandedEvent;

  

OnGetSelectedIndex - event handler for finding index of selected item.

  property OnHasChildren: TTVHasChildrenEvent;

  

Event handler signalled to determine if a given node in the tree view has child nodes.

  property OnKeyDown: TKeyEvent;

  

Handler for keyboard key pressed.

  property OnKeyPress: TKeyPressEvent;

  

Handler for a character 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 for mouse movement within 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 for downward movement of mouse wheel.

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  

Event handler for upward movement of the mouse wheel.

  property OnMouseWheelHorz: TMouseWheelEvent;

  

Event handler for horizontal movements of the mouse wheel.

  property OnMouseWheelLeft: TMouseWheelUpDownEvent;

  

Event handler for left movements of the mouse wheel.

  property OnMouseWheelRight: TMouseWheelUpDownEvent;

  

Event handler for right movements of the mouse wheel.

  property OnNodeChanged: TTVNodeChangedEvent;

  

Event handler signalled when the text for a tree node has been changed.

  property OnResize: TNotifyEvent;

  

Notification handler for a resize of the control.

  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 OnStartDrag: TStartDragEvent;

  

Event handler for the start of a dragging operation.

  property OnUTF8KeyPress: TUTF8KeyPressEvent;

  

Handler for a character entered by the user.

  property Options: TTreeViewOptions;

  

The set of options enabled in the tree view control.

  property Items: TTreeNodes;

  

The container with the TTreeNode instances used in the 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.

end;

Inheritance

TTreeView

  

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

|

TCustomTreeView

  

Ancestor 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

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

See also

TCustomTreeView

  

Ancestor class for TTreeView.

How To Use Standard Controls

  

How to use StdCtrls, ComCtrls or ExtCtrls.