diff --git a/docs/xml/lcl/comctrls.xml b/docs/xml/lcl/comctrls.xml index 1abcf66fe6..67086a58c2 100644 --- a/docs/xml/lcl/comctrls.xml +++ b/docs/xml/lcl/comctrls.xml @@ -19112,13 +19112,17 @@ AToolbar.ButtonHeight := 30; - TAddMode - enumerated type containing a series of constants to determine the place where a node should be placed in a tree. + Enumerated type with values used to determine where a node should be placed in a tree.

- This set is used in TTreeNode.InternalMove and TTreeNodes.InternalAddObject. + TAddMode is the type passed as an argument to methods in TTreeNode and TTreeNodes.

+ + + +
Adds the node as the first child. @@ -19127,20 +19131,28 @@ AToolbar.ButtonHeight := 30; Adds the node as the last child. - Adds the node in front another node. + Adds the node in front a specified node. Represents available multi-select styles. - + +

+ TMultiSelectStyles is an enumerated type with values representing the multi-select options available in TCustomTreeView and TTreeView. The values control the tree nodes and their manner of selection in a multi-selection. +

+

+ Values from TMultiSelectStyles are stored in the TMultiSelectStyle set type, and used to implement the MultiSelectStyle property in TCustomTreeView. +

+
+
- Enables multi-select using Ctrl+Click to select an additional item. + Enables multi-select using Ctrl+Click to add an additional item to an existing selection. @@ -19150,12 +19162,12 @@ AToolbar.ButtonHeight := 30; - Enables multi-select for visible (expanded) items only using Shift+Click. + Enables multi-select for visible (expanded) items only using Shift+Click. Can be used in conjunction with msSiblingOnly.A multi-selection does not include any child nodes unless the nodes are expanded and visible. - Enables range multi-select for sibling items using Shift+Click. + Enables multi-select for only sibling tree nodes using Shift+Click. This excludes parent and/or child tree nodes. @@ -19169,6 +19181,7 @@ AToolbar.ButtonHeight := 30; + @@ -24739,7 +24752,9 @@ AToolbar.ButtonHeight := 30; - Unfold a tree-item when user clicks it or an item activated by code. + + Expands a tree node when it is clicked or activated in code. +

AutoExpand is a Boolean property which indicates if a tree node is automatically expanded when it is Selected using a mouse click or keyboard navigation. The default value for the property is False. @@ -24768,7 +24783,7 @@ AToolbar.ButtonHeight := 30; - Indicates if the current Selection is hidden when the control loses focus. + Indicates if the current selection is hidden when the control loses focus.

@@ -24872,9 +24887,40 @@ AToolbar.ButtonHeight := 30; - OnAdvancedCustomDraw - event handler for advanced custom drawing. + Event handler signalled to custom draw the grid control using drawing stages. - + +

+ OnAdvancedCustomDraw is a TTVAdvancedCustomDrawEvent property with the event handler signalled to paint the grid control. It is signalled (when assigned) from the CustomDraw method, and occurs when the control executes its Paint method. +

+

+ Drawing Stages +

+
+
cdPrePaint
+
+ Paint the control when scrollbars are updated. Called after the OnCustomDraw event handler. +
+
cdPostPaint
+
+ Paint the control after borders have been drawn. +
+
cdPreErase
+
+ Not used in TCustomTreeView. The control does not receive erase notifications. +
+
cdPostErase
+
+ Not used in TCustomTreeView. The control does not receive erase notifications. +
+
+

+ Use OnCustomDraw to paint the control when the drawing stage is cdPrePaint. +

+

+ Use IsCustomDrawn to determine if a handler routine has been assigned to an event handler for a specific drawing target (the control or its items). +

+
@@ -24896,9 +24942,22 @@ AToolbar.ButtonHeight := 30; - OnChanging - specialized event handler while TreeView is being changed. + Event handler signalled before the selected node in the tree view control is changed. - + +

+ OnChanging is a TTVChangingEvent property with the event handler signalled prior to changing the selected node on the tree view control. It allows an application to determine whether the new tree node can become the selected node for the control. +

+

+ Node is the tree node to examine in the handler routine. +

+

+ Set the AllowChange argument to True to allow the tree node to be the selected node on the control. +

+

+ OnChanging is signalled from the CanChange method, and occurs when a new value is assigned to the Selection property. +

+
@@ -25158,9 +25217,11 @@ AToolbar.ButtonHeight := 30; - Allow to show items sorted: by caption, by Data property or both. + Allows items to be sorted by caption, by Data property, or both. - Changing the Text or Data of a node will sort again. While adding nodes does not. Call TreeView1.AlphaSort to sort the whole tree. Call ParentNode.CustomSort(nil) to sort only the child nodes of a single node. +

+ Changing the Text or Data of a node will sort again. While adding nodes does not. Call TreeView1.AlphaSort to sort the whole tree. Call ParentNode.CustomSort(nil) to sort only the child nodes of a single node. +

@@ -25194,7 +25255,9 @@ AToolbar.ButtonHeight := 30; - + + Owner of the class instance. + @@ -25265,7 +25328,9 @@ AToolbar.ButtonHeight := 30;
FMaxRight member
Raises the exception if FMaxRight has a negative value.
IsEditing / Selected
-
Raises the exception if IsEditing is True and Selected is unassigned.
+
+ Raises the exception if IsEditing is True and Selected is unassigned. +
Selected
Raises the exception if the node in Selected is not visible.
Items
@@ -25639,18 +25704,26 @@ AToolbar.ButtonHeight := 30; GetFirstMultiSelected - returns the first node from a multiple selection. - This works only if tvoAllowMultiSelect is enabled. + +

+ Uses the value from the internal member maintained in TTreeNodes. GetFirstMultiSelected is available when tvoAllowMultiSelect has been included in the Options for the control. +

+
- + First tree node in a multi-selection. Gets the last tree node added to a multi-selection in the Items for the controls. - + +

+ Uses the value from the internal member maintained in TTreeNodes. GetLastMultiSelected is available when tvoAllowMultiSelect has been included in the Options for the control. +

+
@@ -25665,6 +25738,15 @@ AToolbar.ButtonHeight := 30;

Select is an overloaded method used to make a node, array of nodes, or list of nodes become selected in the tree view control.

+

+ The overloaded variant with a TShiftState value allows the specified node to be added to the existing multi-selection when Shift contains ssCtrl. If Shift does not include ssCtrl, ClearSelections is called prior to storing the node in Selected. +

+

+ The variants which accept either an array or a list of nodes always call ClearSelections to reset the selected state for multi-selected nodes. The first TTreeNode instance in either is stored in Selected. When tvoAllowMultiSelect has been included in Options, the Selected property in each of the tree nodes is set to True. +

+

+ Use ClearSelections to reset the state for any selected nodes on the tree view control. +

@@ -25682,9 +25764,22 @@ AToolbar.ButtonHeight := 30; - Indicates whether a selected tree node on the control is visible. + Indicates whether selected tree node(s) on the control are visible. - + +

+ SelectionVisible is a Boolean function which indicates whether the selected tree node(s) for the control are in its visible display area. SelectionVisible checks both multi-selections and a single selection on the control. +

+

+ For multi-selections, the GetFirstMultiSelected and GetNextMultiSelected methods are called to visit each of the tree nodes. The return value is set to True when the first tree node with its IsVisible property set to True is found. +

+

+ When Items does not contain multi-selections, the value in Selected is used. The return value is True when the IsFullHeightVisible property in the tree node is set to True. +

+

+ SelectionVisible is used in the MakeSelectionVisible method and controls whether the MakeVisible method is called for the first tree node in a selection. +

+
@@ -25822,7 +25917,7 @@ AToolbar.ButtonHeight := 30; - Color of background area of control. + Color of the background area on the control.

Contains the same value as the Color property. @@ -25835,7 +25930,10 @@ AToolbar.ButtonHeight := 30; Width of the line drawn as a border around the control.

- The default value for the property is 0 in TCustomTreeView. + The default value for the property is 0 in TCustomTreeView. Changing the value for the property causes a CM_BORDERCHANGED control message to be performed. +

+

+ BorderWidth is used when a tree node in Items calculates its display rectangle. It provides the value for the Left member in the TRect instance. It is used when expand/collapse indicators are displayed for the control. It is also used when the bounds rectangle for the Editor on the control is calculated.

@@ -26114,7 +26212,7 @@ AText := ATreeView.Items.Item[0].Text; // caption for the first tree node
  • Insert
  • - See TTreeNodes for more information about the properties and methods in the container class. + See TTreeNodes for more information about the properties and methods in the container class.

    @@ -26125,16 +26223,59 @@ AText := ATreeView.Items.Item[0].Text; // caption for the first tree node - KeepCollapsedNodes - if True, the collapsed nodes are to be retained. + Indicates whether a node keeps its child nodes when it is collapsed. - - + +

    + KeepCollapsedNodes is a Boolean property which indicates whether a tree node keeps its child nodes when the node is collapsed. When set to False (the default value), a tree node will free it child nodes when the node is collapsed. +

    +

    + KeepCollapsedNodes is assigned to the corresponding property in Items, and made available to TTreeNode instances in the container using their Owner property. +

    +

    + Changing the property value causes Options and Items to be updated. When set to True, tvoKeepCollapsedNodes is included in Options. Otherwise, tvoKeepCollapsedNodes is excluded from Options. The new value for the property is assigned to the KeepCollapsedNodes property in Items. +

    +

    + KeepCollapsedNodes is used in the DoExpand method in TTreeNode when the node is being collapsed. +

    +
    + + + + + +
    - Additional options for the MultiSelect property. - - + + Multi-selection options enabled for the tree view control. + + +

    + MultiSelectStyle is a TMultiSelectStyle property which contains multi-selection options enabled for the tree view control. Values in the set type determine which nodes are available to be multi-selected, and the keys used to select them. The default value for the property is defined in the DefaultMultiSelectStyle constant, and enables use of the Ctrl key to add a tree node to a multi-selection. +

    +

    + See TMultiSelectStyles for the available values and their meanings. +

    +

    + Changing the value in MultiSelectStyle causes the new property value to be validated. If an empty set ([]) is assigned, the default value in DefaultMultiSelectStyle is used instead. There must be at least one TMultiSelectStyles enumeration value in the set type. +

    +

    + Use the Options property to enabled multi-selection by including the value tvoAllowMultiselect. +

    +

    + Values in MultiSelectStyle are used when the MouseDown method handles a click on the text or icon for a tree node. +

    +
    + + + + + + + +
    @@ -26202,7 +26343,14 @@ AText := ATreeView.Items.Item[0].Text; // caption for the first tree node Color used to paint the background for the selected tree node in the control. - + +

    + SelectionColor is a TColor property with the color used to paint the background for the selected tree node. The default value for the property is clHighlight. Changing the value for the property causes the control to be redrawn. +

    +

    + SelectionColor is not currently used in the TCustomTreeView implementation. +

    +
    @@ -26224,9 +26372,15 @@ AText := ATreeView.Items.Item[0].Text; // caption for the first tree node
    - Color used to draw the text for a selected item. - - + Color used to draw the text for a (multi-)selected item when enabled. + +

    + Not used in the current LCL implementation. There is a SelectionFontColor property available in the Delphi VCL. +

    +
    + + +