[Overview][Constants][Types][Classes][Procedures and functions][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Ancestor class for TTreeView.
Source position: comctrls.pp line 3335
type TCustomTreeView = class(TCustomControl) |
||
protected |
||
|
Member with the OnChange timer for the control. |
|
|
TEdit used as the editor in the tree view control. |
|
class procedure WSRegisterClass; override; |
|
Registers this component class with the current WidgetSet. |
class function GetControlClassDefaultSize; override; |
|
Gets the default dimensions used for new instances of the class. |
procedure Added(); virtual; |
|
Performs actions needed when the specified tree node is added to Items. |
procedure EditorEditingDone(); virtual; |
|
Implements the OnEditingDone event handler for the Editor in the control. |
procedure EditorKeyDown(); virtual; |
|
Implements the OnKeyDown event handler for the Editor in the control. |
procedure BeginAutoDrag; override; |
|
For internal use: user has started dragging the control. |
procedure BeginEditing(); virtual; |
|
Prepares the control to edit the text for the specified tree node. |
function DoDragMsg(); override; |
|
Dispatches a drag message, sent by the DragManager. |
function CanChange(); virtual; |
|
True if the specified tree node can be used in the Selected or Selections properties. |
function CanCollapse(); virtual; |
|
Returns True if a given TreeNode can be collapsed. |
function CanEdit(); virtual; |
|
Returns True if the specified tree node can be edited. |
function CanExpand(); virtual; |
|
True if the specified tree node can be expanded. |
function CreateNode; virtual; |
|
CreateNode - creates a new node in a TreeView and returns its content. |
function CreateNodes; virtual; |
|
Creates a TTreeNodes container for the control. |
function CustomDraw(); virtual; |
|
CustomDraw - returns True if Custom Drawing is proceeding in the specified Rectangle. |
function CustomDrawItem(); virtual; |
|
CustomDrawItem - returns True if Custom Image drawing is proceeding at the specified TreeNode. |
function DefaultItemHeightIsStored; |
|
Implements the storage specifier for the DefaultItemHeight property. |
procedure DoAutoAdjustLayout(); override; |
|
Applies a layout adjustment policy using the specified scaling factors. |
function ExpandSignSizeIsStored; |
|
Implements the storage specifier for the ExpandSignSize property. |
function GetBuiltinIconSize; virtual; |
|
Gets the default size for icons when Images has not been assigned. |
function GetDragImages; override; |
|
Gets the image list with the Drag images for the control. |
function GetImageSize; |
|
Gets a TSize instance with the dimensions for images in the control. |
function GetMaxLvl; |
|
GetMaxLvl - returns the maximum level of branching of the tree structure. |
function GetMaxScrollLeft; |
|
GetMaxScrollLeft - returns maximal extent of scrolling to the left. |
function GetMaxScrollTop; |
|
GetMaxScrollTop - returns the maximal extent of scrolling upwards. |
function GetNodeAtY(); |
|
Gets an expanded node at the specified vertical coordinate. |
function GetNodeDrawAreaHeight; |
|
Gets the height for the usable drawing area in the control. |
function GetNodeDrawAreaWidth; |
|
Gets the width for the usable drawing area in the control. |
function IndentIsStored; |
|
Implements the storage specifier for the Indent property. |
function IsCustomDrawn(); virtual; |
|
IsCustomDrawn - returns True if the specified target is custom drawn. |
function IsNodeVisible(); |
|
Returns True if the specified tree node and its parent nodes are visible and expanded. |
function IsNodeHeightFullVisible(); |
|
IsNodeHeightFullVisible - returns True if the full height of the specified node is visible in the current view. |
function IsInsertMarkVisible; virtual; |
|
IsInsertMarkVisible - returns True if an Insert mark is visible. |
procedure MoveSelection(); |
|
Makes the specified node selected in the tree view control. |
procedure Change(); virtual; |
|
Performs actions needed when the selection in the control has been changed to include the specified tree node. |
procedure Collapse(); virtual; |
|
Performs actions needed when the specified tree node is collapsed. |
procedure CreateWnd; override; |
|
Performs actions needed when the handle for the control is (re-)created. |
procedure Click; override; |
|
Performs actions needed when the Left mouse is clicked on the tree view control. |
procedure DblClick; override; |
|
Performs actions needed when the Left mouse button is double clicked on the tree view control. |
procedure TripleClick; override; |
|
Performs actions needed when the Left mouse is triple clicked on the tree view control. |
procedure QuadClick; override; |
|
Performs actions needed when the Left mouse is quadruple clicked on the tree view control. |
procedure Delete(); virtual; |
|
Performs actions needed when the specified tree node is deleted. |
procedure DestroyWnd; override; |
|
Performs actions needed when the handle for the control is destroyed. |
procedure DoCreateNodeClass(); virtual; |
|
Signals the OnCreateNodeClass event handler (when assigned). |
procedure DoEndDrag(); override; |
|
Invokes the OnEndDrag handler. |
function DoMouseWheel(); override; |
|
Invokes the OnMouseWheel handlers, when the wheel has been turned. |
function DoMouseWheelHorz(); override; |
|
Performs actions to handle a horizontal mouse wheel message. |
procedure DoPaint; virtual; |
|
Implements the Paint method for the control. |
procedure DoPaintNode(); virtual; |
|
Renders the specified tree node to the canvas for the control. |
procedure DoStartDrag(); override; |
|
Performs actions needed when a drag operation is started for the control. |
procedure DragOver(); override; |
|
Performs actions needed when an object is dragged over the tree view control. |
function DrawBuiltinIcon(); virtual; |
|
Defines a method used to draw a built-in icon for a specified tree node. |
procedure EndEditing(); virtual; |
|
Updates the specified tree node and hides editor. |
procedure EnsureNodeIsVisible(); |
|
Ensures parent nodes are expanded, and the specified node is visible in the control. |
procedure Expand(); virtual; |
|
Expands the specified tree node and updates the scroll bars for the control. |
procedure GetImageIndex(); virtual; |
|
Gets the index of the image for the specified node. |
procedure GetSelectedIndex(); virtual; |
|
Gets the index for the image used a selected node in the control. |
procedure InitializeWnd; override; |
|
Configures the control when its window handle is (re-)initialized. |
procedure KeyDown(); override; |
|
Handles key down events for the control. |
procedure Loaded; override; |
|
Performs actions needed when LCL component streaming has been completed. |
procedure MouseDown(); override; |
|
Handles mouse down events for the tree view control. |
procedure MouseMove(); override; |
|
Handles mouse move messages for the control. |
procedure MouseUp(); override; |
|
Handles mouse up events for the control. |
procedure MouseLeave; override; |
|
Performs actions needed when the mouse cursor leaves the control. |
procedure NodeChanged(); virtual; |
|
Performs actions when a property value in the specified tree node has been changed. |
function NodeHasChildren(); virtual; |
|
Determines if the specified tree node has child nodes. |
procedure Notification(); override; |
|
Handles the notification when a component is added to or removed from the class instance. |
procedure Paint; override; |
|
Implements the default handler used to draw the control. |
procedure ScrollView(); |
|
Scrolls the visible area in the control by the specified horizontal and vertical offsets. |
procedure SetDragMode(); override; |
|
Sets the value for the DragMode property. |
procedure SetOptions(); virtual; |
|
Sets the value for the Options property. |
procedure UpdateDefaultItemHeight; virtual; |
|
Calculates and updates the value in the DefaultItemHeight property. |
procedure UpdateInsertMark(); virtual; |
|
Sets or removes an insertion mark at the specified position based on the values in Options. |
procedure DoSelectionChanged; virtual; |
|
Performs actions needed when the selection for the tree view has been changed. |
procedure WMHScroll(); message; |
|
Handles the LM_HSCROLL message for the control. |
procedure WMVScroll(); message; |
|
Handles the LM_VSCROLL message for the control. |
procedure WMLButtonDown(); message; |
|
Handles the LM_LBUTTONDOWN message for the control. |
procedure WMSetFocus(); message; |
|
Handles the LM_SETFOCUS message for the control. |
procedure WMKillFocus(); message; |
|
Handles the WMKillFocus message for the control. |
procedure Resize; override; |
|
Resizes the control and updates the scroll bars and the States property. |
property EditingItem: TTreeNode; [r] |
|
Contains the tree node being edited in the control. |
property States: TTreeViewStates; [r] |
|
Contains the state values in effect for the control. |
public |
||
function GetSelectedChildAccessibleObject; override; |
|
Returns the currently selected child accessible object. |
function GetChildAccessibleObjectAtPos(); override; |
|
Returns the child accessibility object at the given position for the control. |
property AccessibilityOn: Boolean; [rw] |
|
Turns accessibility on or off to speed up the control. |
protected |
||
property AutoExpand: Boolean; [rw] |
|
Unfold a tree-item when user clicks it or an item activated by code. |
property BorderStyle: TBorderStyle; |
|
Line style used to draw the border for the control. |
property HideSelection: Boolean; [rw] |
|
Indicates if the current Selection is hidden when the control loses focus. |
property HotTrack: Boolean; [rw] |
|
Additionally highlight/underline tree-item when mouse is over it. |
property HotTrackColor: TColor; [rw] |
|
Font color used for the text in a tree node when hot tracking is enabled. |
property DisabledFontColor: TColor; [rw] |
|
Font color used for tree nodes when the tree view is not enabled. |
property Indent: Integer; [rws] |
|
Size in pixels by which each nested branching level is to be indented. |
property MultiSelect: Boolean; [rw] |
|
Enables or disables selection of several tree-items at one time. |
property OnAddition: TTVExpandedEvent; [rw] |
|
Event handler signalled when a tree node is added to the tree node Items in the control. |
property OnAdvancedCustomDraw: TTVAdvancedCustomDrawEvent; [rw] |
|
OnAdvancedCustomDraw - event handler for advanced custom drawing. |
property OnAdvancedCustomDrawItem: TTVAdvancedCustomDrawItemEvent; [rw] |
|
OnAdvancedCustomDrawItem - event handler for advanced custom drawing item. |
property OnChange: TTVChangedEvent; [rw] |
|
OnChange - specialized event handler for a change in the TreeView. |
property OnChanging: TTVChangingEvent; [rw] |
|
OnChanging - specialized event handler while TreeView is being changed. |
property OnCollapsed: TTVExpandedEvent; [rw] |
|
OnCollapsed - specialized event handler when part of the tree is collapsed. |
property OnCollapsing: TTVCollapsingEvent; [rw] |
|
OnCollapsing - specialized event handler while part of the tree is being collapsed. |
property OnCompare: TTVCompareEvent; [rw] |
|
OnCompare - specialized event handler for comparisons within the TreeView. |
property OnCreateNodeClass: TTVCreateNodeClassEvent; [rw] |
|
Event handler signalled to get the class reference used to create new tree nodes. |
property OnCustomCreateItem: TTVCustomCreateNodeEvent; [rw] |
|
OnCustomCreateItem - event handler for custom item creation. |
property OnCustomDraw: TTVCustomDrawEvent; [rw] |
|
OnCustomDraw - event handler for custom drawing. |
property OnCustomDrawItem: TTVCustomDrawItemEvent; [rw] |
|
OnCustomDrawItem - event handler for custom drawing item. |
property OnCustomDrawArrow: TTVCustomDrawArrowEvent; [rw] |
|
Event handler signalled to custom draw expand or collapse indicators. |
property OnDeletion: TTVExpandedEvent; [rw] |
|
Event handler signalled when a node is deleted from the node tree. |
property OnEdited: TTVEditedEvent; [rw] |
|
OnEdited - specialized event handler when the TreeView has been edited. |
property OnEditing: TTVEditingEvent; [rw] |
|
OnEditing - specialized event handler while a TreeView is being edited. |
property OnEditingEnd: TTVEditingEndEvent; [rw] |
|
Event handler signalled when EndEditing is called for the control. |
property OnExpanded: TTVExpandedEvent; [rw] |
|
OnExpanded - specialized event handler when a TreeView has been expanded. |
property OnExpanding: TTVExpandingEvent; [rw] |
|
OnExpanding - specialized event handler while a TreeView is being expanded. |
property OnGetImageIndex: TTVExpandedEvent; [rw] |
|
OnGetImageIndex - event handler for finding the index of an image. |
property OnGetSelectedIndex: TTVExpandedEvent; [rw] |
|
OnGetSelectedIndex - event handler for finding index of selected item. |
property OnHasChildren: TTVHasChildrenEvent; [rw] |
|
Event handler signalled to determine if a given node in the tree view has child nodes. |
property OnNodeChanged: TTVNodeChangedEvent; [rw] |
|
Event handler signalled when the text for a tree node has been changed. |
property OnSelectionChanged: TNotifyEvent; [rw] |
|
Event handler signalled when the selection in the tree view control is changed. |
property ReadOnly: Boolean; [rw] |
|
Indicates whether the text (or caption) for tree nodes can be edited in the control. |
property RightClickSelect: Boolean; [rw] |
|
Right-click also selects tree-item. Else it only calls PopupMenu. |
property RowSelect: Boolean; [rw] |
|
When a tree-item is selected, paint selection background with full width. |
property ScrolledLeft: Integer; [rw] |
|
Horizontal coordinate for the origin of the visible display area. |
property ScrolledTop: Integer; [rw] |
|
Vertical coordinate for the origin of the visible display area. |
property ShowButtons: Boolean; [rw] |
|
Enables an expand/collapse (fold/unfold) icon for nodes with child nodes. |
property ShowLines: Boolean; [rw] |
|
Enables the horizontal and vertical lines which join nodes in the tree hierarchy. |
property ShowRoot: Boolean; [rw] |
|
Enables drawing of the root node indicator for the tree view control. |
property ShowSeparators: Boolean; [rw] |
|
Indicates if horizontal separators are drawn between nodes in the tree view control. |
|
Allow to show items sorted: by caption, by Data property or both. |
|
property ToolTips: Boolean; [rw] |
|
Show tooltip (hint) for a tree-item when the item is too long to fit by width and mouse is over it. |
public |
||
constructor Create(); override; |
|
Create - constructor for TCustomTreeView: calls inherited Create then sets defaults for style, size, etc. |
destructor Destroy; override; |
|
Destroy - destructor for TCustomTreeView: frees images, nodes and links, then calls inherited Destroy. |
function AlphaSort; |
|
Sorts tree nodes using default sort procedure (alphabetic). |
procedure ClearSelection(); virtual; |
|
Clears the selection in the tree view control. |
procedure ConsistencyCheck; |
|
Verifies that values are updated and valid for the tree view control. |
function CustomSort(); |
|
If True, the external method specified in SortProc is used for sorting. |
function DefaultTreeViewSort(); |
|
DefaultTreeViewSort - returns result of string comparison between names of Node1 and Node2 |
procedure EraseBackground(); override; |
|
Has an empty implementation in the current LCL version. |
function GetHitTestInfoAt(); |
|
GetHitTestInfoAt - returns the result of a hit test at the point (X, Y). |
function GetNodeAt(); |
|
Searches all expanded nodes for the tree node at the specified position. |
function GetNodeWithExpandSignAt(); |
|
Gets the tree node at the specified vertical coordinate with a visible expand symbol. |
procedure GetInsertMarkAt(); |
|
GetInsertMarkAt - find if there is an insert mark at the specified coordinates. |
procedure SetInsertMark(); |
|
SetInsertMark - place an Insert mark at the specified node in the tree. |
procedure SetInsertMarkAt(); virtual; |
|
SetInsertMarkAt - place an insert mark at the specified coordinates. |
procedure Invalidate; override; |
|
Causes the control to be redrawn when a redraw is not already in progress. |
function IsEditing; |
|
Indicates if the control is currently editing a node in the tree. |
procedure BeginUpdate; |
|
Starts an update process for the tree view control. |
procedure EndUpdate; |
|
Finishes an update process for the tree view control. |
procedure FullCollapse; |
|
Collapses all nodes in the tree view and displays only the root for the tree. |
procedure FullExpand; |
|
Expands all nodes in the tree view. |
procedure LoadFromFile(); |
|
Load tree view data from the specified file. |
procedure LoadFromStream(); |
|
Loads tree view data from the specified stream. |
procedure SaveToFile(); |
|
Saves the tree view data to the specified file. |
procedure SaveToStream(); |
|
Saves the tree view data to the specified stream. |
procedure WriteDebugReport(); |
|
WriteDebugReport - used for debugging. |
procedure LockSelectionChangeEvent; |
|
LockSelectionChangeEvent - if the selection has changed, lock its status. |
procedure UnlockSelectionChangeEvent; |
|
UnlockSelectionChangeEvent - unlock a selection to allow it to be changed. |
function GetFirstMultiSelected; |
|
GetFirstMultiSelected - returns the first node from a multiple selection. |
function GetLastMultiSelected; |
|
Gets the last tree node added to a multi-selection in the Items for the controls. |
procedure Select(); |
|
Makes the specified node(s) become selected in the control. |
function SelectionVisible; |
|
SelectionVisible - returns True if a selection is visible. |
procedure MakeSelectionVisible; |
|
MakeSelectionVisible - method for making a selection visible. |
procedure ClearInvisibleSelection; |
|
Clears selected tree node(s) in the control if they are not visible. |
function StoreCurrentSelection; |
|
Creates and fills a TStringList with the text for the selected nodes in the control. |
procedure ApplyStoredSelection(); |
|
Selects the first node with text matching a value in the specified list. |
procedure MoveToNextNode(); |
|
Moves the selection to the next tree node following the last selection in the control. |
procedure MoveToPrevNode(); |
|
Moves the selection to the visible tree node following prior to the last selection in the control. |
procedure MovePageDown(); |
|
Moves the selection to the next display page for the control. |
procedure MovePageUp(); |
|
Moves the selection to the previous display page for the control. |
procedure MoveHome(); |
|
Moves to and optionally selects the first visible node in the control. |
procedure MoveEnd(); |
|
Moves to and optionally selects the last expanded child node in Items. |
property BackgroundColor: TColor; [rws] |
|
Color of background area of control. |
property BorderWidth: TBorderWidth; |
|
Width of the line drawn as a border around the control. |
property BottomItem: TTreeNode; [rw] |
|
Last visible tree node starting at the TopItem in the control. |
|
Color used for the background in the control display area. |
|
property DefaultItemHeight: Integer; [rws] |
|
Default height for tree nodes in the control. |
property DropTarget: TTreeNode; [rw] |
|
DropTarget - the target node for dropping a dragged item. |
property ExpandSignColor: TColor; [rw] |
|
Color used to paint expand/collapse (fold/unfold) symbol (i.e. plus/minus symbol). |
property ExpandSignSize: Integer; [rws] |
|
Size of expand/collapse (fold/unfold) symbol. |
property ExpandSignType: TTreeViewExpandSignType; [rw] |
|
Sets the shape for the expand/collapse (fold/unfold) symbols. |
property Images: TCustomImageList; [rw] |
|
Image list which holds icons for the tree nodes in Items. |
property ImagesWidth: Integer; [rw] |
|
Width for the Images used in the tree view control. |
property InsertMarkNode: TTreeNode; [rw] |
|
InsertMarkNode - place a marker on the specified node. |
property InsertMarkType: TTreeViewInsertMarkType; [rw] |
|
InsertMarkType - the type of marker to be inserted. |
property Items: TTreeNodes; [rw] |
|
The container with the TTreeNode instances used in the control. |
property KeepCollapsedNodes: Boolean; [rw] |
|
KeepCollapsedNodes - if True, the collapsed nodes are to be retained. |
property MultiSelectStyle: TMultiSelectStyle; [rw] |
|
Additional options for the MultiSelect property. |
property Options: TTreeViewOptions; [rw] |
|
The set of options enabled in the tree view control. |
property ScrollBars: TScrollStyle; [rw] |
|
Specifies the scroll bars displayed for the tree view control. |
|
The selected tree node in the control. |
|
property SelectionColor: TColor; [rw] |
|
Color used to paint the background for the selected tree node in the control. |
property SelectionCount: Cardinal; [r] |
|
Number of selected nodes in the tree view. |
property SelectionFontColor: TColor; [rw] |
|
Color used to draw the text for a selected item. |
property SelectionFontColorUsed: Boolean; [rw] |
|
Indicates if the selection font color is used for selected items. |
property Selections []: TTreeNode; [r] |
|
Provides indexed access to the multi-selected tree nodes in the control. |
property SeparatorColor: TColor; [rw] |
|
Color used to paint horizontal lines between tree nodes when enabled. |
property StateImages: TCustomImageList; [rw] |
|
Image list with the bitmaps used to represent the state for nodes in the tree. |
property StateImagesWidth: Integer; [rw] |
|
Width for the bitmaps in the StateImages property. |
|
TopItem - the first visible node of the tree. |
|
property TreeLineColor: TColor; [rw] |
|
Color used to draw the lines which connect the nodes in the tree. |
property TreeLinePenStyle: TPenStyle; [rw] |
|
Style of the TPen used to draw lines used to connect nodes in the control. |
published |
||
property TabStop: Boolean; |
|
Enables or disables navigation using the Tab key. |
end; |
|
Ancestor class for TTreeView. |
|
| | ||
|
The base class for windowed controls which paint themselves. |
|
| | ||
|
Implements a windowed control which can contain other child controls. |
|
| | ||
|
The base class for visible controls. |
|
| | ||
|
The base class for LCL components which have an associated widget. |
|
| | ||
TComponent |
||
? | ||
TObject |
TCustomTreeView - ancestor class for TTreeView, which displays a collection of items in a hierarchical tree form. This class defines many properties which are inherited by descendent classes, including loading the data from files or streams, saving to files or streams, updating, sorting alphabetically, editing, making visible or invisible, expanding or collapsing the tree display, and many more.
Please note that Accessibility support in TCustomTreeView might make this control slower if there are a very large number of items, for example: 10,000+ items. If the performance impact is unacceptable, it is possible to turn accessibility off for tree view items by setting the AccessibilityOn property to False. The default value is True.
|
TTreeView is a control that displays a hierarchical list of items. |