[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 3775

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;

  

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 DefaultItemHeight: Integer;

  

Default height for tree nodes in the control.

  property DisabledFontColor: TColor;

  

Font color used for a tree node when the tree view or the node is not enabled.

  property DragKind: TDragKind;

  

Indicates the action performed for a drag operation: drag-and-drop or drag-and-dock.

  property DragCursor: TCursor;

  

The cursor shape shown during a drag operation.

  property DragMode: TDragMode;

  

Determines how a drag operation is started for the control.

  property Enabled: Boolean;

  

Determines whether the control responds to mouse or keyboard input.

  property ExpandSignColor: TColor;

  

Color used to paint expand / collapse (fold / unfold) indicators for tree nodes.

  property ExpandSignSize: Integer;

  

Size of the expand / collapse (fold / unfold) indicators for tree nodes.

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

  

Font color used to draw the text on a hovered 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;

  

Number of pixels used to indent branch levels (child nodes) on the tree view control.

  property MultiSelect: Boolean;

  

Enables or disables selection of multiple tree nodes at the same time.

  property MultiSelectStyle: TMultiSelectStyle;

  

Multi-selection options enabled for the tree view control.

  property ParentColor: Boolean;

  

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

  property RightClickSelect: Boolean;

  

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

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

  

Color used to draw the text for a (multi-)selected item when enabled.

  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 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 ShowSeparators: Boolean;

  

Indicates whether horizontal separator lines are drawn between nodes on the tree view control.

  property SortType: TSortType;

  

Allows items to be sorted by caption, by the 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;

  

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 OnAddition: TTVExpandedEvent;

  

Event handler signalled when a tree node is added to the Items in the tree view 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 OnCompare: TTVCompareEvent;

  

Event handler signalled to compare and sort tree nodes in their default order.

  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;

  

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 OnCustomDrawArrow: TTVCustomDrawArrowEvent;

  

Event handler signalled to custom draw expand / collapse (fold) indicators for a tree node.

  property OnDblClick: TNotifyEvent;

  

Event handler signalled when a mouse double click occurs in the control.

  property OnDeletion: TTVExpandedEvent;

  

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

  property OnDragDrop: TDragDropEvent;

  

Event handler signalled when an object is dropped onto the control.

  property OnDragOver: TDragOverEvent;

  

Event handler signalled when a control is dragged over the control instance.

  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 OnEditingEnd: TTVEditingEndEvent;

  

Event handler signalled when EndEditing is called for the control.

  property OnEndDrag: TEndDragEvent;

  

Event handler signalled for the end of a drag-drop operation.

  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 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 signalled 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 for 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

  

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,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

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

  

The base class for TTreeView.

How To Use Standard Controls

  

How to use StdCtrls, ComCtrls or ExtCtrls.


Version 3.2 Generated 2024-02-25 Home