diff --git a/docs/xml/lcl/comctrls.xml b/docs/xml/lcl/comctrls.xml index 74419febe2..28b131f74c 100644 --- a/docs/xml/lcl/comctrls.xml +++ b/docs/xml/lcl/comctrls.xml @@ -573,7 +573,7 @@ However if SimplePanel is false, then there can be multiple panels or sub-sections of the status bar whose properties are described in Panels.

- The property SimpleText can be assigned programmatically to display the value of some variable, such as the position of the Splitter in the example. + The property SimpleText can be assigned in code to display the value of some variable, such as the position of the Splitter in the example.

@@ -1059,7 +1059,7 @@ Event handler signalled to draw a panel in the status bar

- OnDrawPanel is an event handler used to draw the specified panel on the status bar. OnDrawPanel is signalled (when assigned) from the DrawPanel method. Assign an object procedure using the signature in TDrawPanelEvent to render the specified panel to the desired rectangle in the status bar. + OnDrawPanel is an event handler used to draw the specified panel on the status bar. OnDrawPanel is signalled (when assigned) from the DrawPanel method. Assign an object procedure using the signature in TDrawPanelEvent to render the specified panel to the desired rectangle in the status bar.

@@ -2655,7 +2655,7 @@ KeyDown is overridden in TCustomTabControl to handle use of the Tab key (VK_TAB) to change the active page in the tabbed control.

- The Options property must contain the value nboKeyboardTabSwitch to enable the tab switching feature. Pressing Ctrl+Tab switches to the next page by incrementing the PageIndex value. Pressing Ctrl+Shift+Tab switches to the previous page by decrementing the PageIndex value. + The Options property must contain the value nboKeyboardTabSwitch to enable the tab switching feature. Pressing Ctrl+Tab switches to the next page by incrementing the PageIndex value. Pressing Ctrl+Shift+Tab switches to the previous page by decrementing the PageIndex value.

If Key is not the VK_TAB virtual key code, the inherited method is called to handle the values in Key and Shift. @@ -3192,7 +3192,7 @@ ImagesWidth specifies the width used for the Images in the control. ImagesWidth determines the resolution (either selected or resized) for the current display density (PPI).

- Changing the value in the property causes the DoImageListChange method to be called to select the image resolution, and to notify the widgetset class of the change. The UpdateTabProperties method is called to propogate the change to all tabs in the control. + Changing the value in the property causes the DoImageListChange method to be called to select the image resolution, and to notify the widgetset class of the change. The UpdateTabProperties method is called to propagate the change to all tabs in the control.

@@ -4903,7 +4903,7 @@ Sets the Height for tabs displayed on the control

- SetTabHeight is used to set the height for the tabs displayed on the control to the value in AValue. SetTabHeight calls GetCapabilities to determine if the value nbcTabsSizeable is included in the capabilties for the control. No actions are performed in the method when nbcTabsSizeable is not present in the controls capabilities list. + SetTabHeight is used to set the height for the tabs displayed on the control to the value in AValue. SetTabHeight calls GetCapabilities to determine if the value nbcTabsSizeable is included in the capabilities for the control. No actions are performed in the method when nbcTabsSizeable is not present in the controls capabilities list.

SetTabHeight propogates the new tab height to the Notebook which contains the Tabs in the control. @@ -5306,7 +5306,7 @@

- DisplayRect is a read-only TRect property which contains the display area for the page in the tabbed control. It uses the client rectangle for the control as the value for the property. Use TabRect to get the display area for the tab in the tabbed control. + DisplayRect is a read-only TRect property which contains the display area for the page in the tabbed control. It uses the client rectangle for the control as the value for the property. Use TabRect to get the display area for the tab in the tabbed control.

@@ -6235,7 +6235,7 @@

- Assign is an overridden method used copy property values from the persistent object in ASource into the current class instance. When ASource is a TListItem descendant, the following property values are copied: + Assign is an overridden method used copy property values from the persistent object in ASource into the current class instance. When ASource is a TListItem descendant, the following property values are copied:

  • Caption
  • @@ -9270,7 +9270,7 @@

    - ColClick - procedure to simulate the OnColumnClick event. Can be used programmatically to execute the same code as is used to respond to the OnColumnClick event. + ColClick - procedure to simulate the OnColumnClick event. Can be used in code to execute the same code as is used to respond to the OnColumnClick event.

    @@ -9682,7 +9682,7 @@

    - Handles an F2 function key pressed when the control has focus. Ensures that the editor is displayed when the control is not marked as ReadOnly. The keystroke is digested (set to zero). + Handles an F2 function key pressed when the control has focus. Ensures that the editor is displayed when the control is not marked as ReadOnly. The keystroke is digested (set to zero).

    If the control is marked as ReadOnly, or Key is not the unshifted F2 function key, the inherited KeyDown method is called to handle the values in Key and Shift. @@ -9763,7 +9763,7 @@ - Time (in msec) for which the mouse cursor must hover over an item before its tooltip is shown + Time (in milliseconds) for which the mouse cursor must hover over an item before its tooltip is shown @@ -10948,7 +10948,6 @@ Applies an arbitrary increment value to the Position for the progress bar - @@ -12659,7 +12658,7 @@ - CheckMenuDropdown - returns True if there is a checked dropdown menu + CheckMenuDropdown - returns True if there is a checked dropdown menu @@ -13378,7 +13377,7 @@ - CheckMenuDropdown - returns True if there is a checked dropdown menu + CheckMenuDropdown - returns True if there is a checked dropdown menu @@ -14550,7 +14549,7 @@ - Color for the band + Color for the band

    The default value for the property is clDefault. Please note that the default value for ParentColor is True, and causes the color defined for the TCoolBar control to be used. @@ -15549,7 +15548,7 @@ - TTrackBarOrientation - enumerated type denoting horizontal or vertical orientation for TrackBar + TTrackBarOrientation - enumerated type denoting horizontal or vertical orientation for a track bar @@ -15563,19 +15562,25 @@ - TTickMark - enumerated type denoting position of tick marks relative to the TrackBar + TTickMark - enumerated type denoting position of tick marks relative to the track bar - + + Tick marks are displayed on the bottom or right edge for the track bar orientation + - + + Tick marks are displayed on the top or left edge for the track bar orientation + - + + Tick marks are displayed on both edges of the track bar orientation + @@ -15586,18 +15591,22 @@ - + Tick marks are disabled - + + The tick mark count is determined using the Min, Max, and Frequency for a track bar control + - + + The number of tick marks is manually calculated. Used for the Mac OS Cocoa widgetset. + - TTrackBarScalePos - enumerated type denoting position of the scale for a TrackBar + TTrackBarScalePos - enumerated type denoting position of the scale for a track bar @@ -15626,6 +15635,7 @@ + @@ -15644,148 +15654,152 @@ - + Sets the value for the Frequency property - + + + - + New value for the property - + Sets the value for the LineSize property - + + + - + New value for the property - + Sets the value for the Max property - + New value for the property - + Sets the value for the Min property - + New value for the property - + Sets the value for the Orientation property - + New value for the property - + Sets the value for the PageSize property - + New value for the property - + Sets the values in the Position, Min, and Max properties - + New value for the Position property - + New value for the Min property - + New value for the Max property - + Sets the value for the Position property - + New value for the property - + Sets the value for the Reversed property - + New value for the property - + Sets the value for the ScalePos property - + New value for the property - + Sets the value for the SelEnd property - + New value for the property - + Sets the value for the SelStart property - + New value for the property - + Sets the value for the ShowSelRange property - + New value for the property - + Sets the value for the TabStop property - + New value for the property - + Sets the value for the TickStyle property - + New value for the property - + Not used in the current LCL implementation @@ -15794,21 +15808,23 @@ - ApplyChanges - implement any pending changes + Sends message to update the visual appearance of the object - + + Signals the OnChange event handler (when assigned) + - DoChange - system message to implement changes + Performs actions needed to update the position for the track bar and signal the OnChange event @@ -15818,7 +15834,9 @@ - + + Normalizes values in Min and Max, and ensures that Position is in range + @@ -15857,114 +15875,129 @@ - + + Determines whether the width and height for the control are automatically resized + - + True if the value in Width should be resized - + True if the value in Height should be resized - Create - constructor for TCustomTrackBar: calls inherited Create then initializes style, position, size and bounds + Constructor for the class instance - + +

    + Create is the overridden constructor for TCustomTrackBar, and calls the inherited method on entry. +

    +

    + Create sets the default values for properties and members in the class instance, including the component and control style flags. The initial bounds for the control are set to the values from the GetControlClassDefaultSize method. +

    +
    TWinControl.Create - TComponent.Create - + Owner of the class instance - SetTick - set the interval for ticks on the taskbar (integer) + Sets the position for the tick mark displayed on the track bar control - + Position for the tick mark (between Min and Max) - Frequency - how frequently the position of the slider is to be read and updated (currently unsupported) + Indicates the frequency of tick marks displayed for the control - Line-Size - increment for slider position when an arrow key is pressed + Increment applied to the slider position when an arrow key is pressed - Max - the value corresponding to full movement of the slider. Default = 10 + Maximum value or position for the track bar slider - Min - the value associated with the minimum slider position. Default = 0 + Minimum value or position for the track bar slider - OnChange - action to be taken on change in the slider position + Event handler signalled when the Position in the control has been changed - Orientation - horizontal or vertical + Indicates the horizontal or vertical orientation for the track bar control - PageSize - increment for slider position when PageUp or PageDown key is pressed + The increment for the slider position when PageUp or PageDown key is pressed - Position - the location of the slider along the track bar. Represents the Return value from the control + Location of the slider on the track bar between the Min and Max values - + + True if the values are displayed in ascending order from right-to-left + - ScalePos - whether scaling label appears at top, bottom, left or right + Position where the scale is displayed + + This is a GTK-specific property. + - + Ending value for the selection range in the track bar control - + Starting value for the selection range in the track bar control - + + Displays a selection range and indicators using the values in SelStart and SelEnd + @@ -15977,17 +16010,49 @@ - Tickmarks - whether the ticks are above/left, below/right, or both + Position for the tick marks relative to the slider in the track bar - Tickmarks - where the ticks appear relative to the bar: above/left, below/right, or both +

    + Tickmarks indicates where the ticks appear relative to the slider in the track bar control. +

    +
    +
    tmBottomRight
    +
    + Tick marks are displayed on the bottom for the horizontal orientation, and on the right for the vertical orientation. +
    +
    tmTopLeft
    +
    + Tick marks are displayed on the top for the horizontal orientation, and on the left for the vertical orientation. +
    +
    tmBoth
    +
    + Tick marks are displayed on both sides for the selected orientation. +
    +
    - TickStyle - none, produced automatically or calculated manually + Indicates the tick mark drawing style for the control + +
    +
    tsNone
    +
    + Disables display of tick marks. +
    +
    tsAuto
    +
    + Tick mark count is automatically calculated using Min, Max, and Frequency. +
    +
    tsManual
    +
    + Used for Mac OS Cocoa. For other widgetsets, it displays the Selection Range markers but no other tick marks. +
    +
    +
    @@ -16133,7 +16198,9 @@ - + + Location where a new tree node is attached to its Parent, Child, or Sibling nodes + @@ -16220,7 +16287,7 @@ - TTreeNodeArray - pointer to a TTreeNode + Pointer to a TTreeNode type which is the first instance in an allocated block of memory @@ -16299,7 +16366,7 @@ - A constant for the identifier of a LCL stream + A constant with the identifier for a LCL stream @@ -16330,31 +16397,70 @@ - TTVChangedEvent - generic event handling method for a changed Tree Node + Specifies an event handler signalled when a tree node has been changed - - + +

    + TTVChangedEvent is an object procedure type which specifies an event handler signalled when a node has been changed in a TCustomTreeView / TTreeView control. +

    +

    + Sender is the TObject instance for the change notification event. +

    +

    + Node is the TTreeNode instance that has been modified. +

    +

    + TTVChangedEvent is the type used for the TCustomTreeView.OnChange property. +

    +
    + + + + +
    - + Object for the event notification - + Tree node for the event notification - - - + + Specifies an event handler signalled when values in a tree node have been changed + + +

    + TTVNodeChangedEvent is an object procedure type which specifies an event handler signalled when values in a tree node have been changed. +

    +

    + Sender contains the tree view control for the change notification. +

    +

    + Node is the TTreeNode instance with the modified value. +

    +

    + ChangeReason is a TTreeNodeChangeReason enumeration value that indicates the property changed in the tree node. +

    +

    + TTVNodeChangedEvent is the type used for the TCustomTreeView.OnNodeChanged property. +

    +
    + + + + +
    - + Object (tree view control) for the event notification - + Tree node with the modified value - + Indicates the value that was changed in the tree node @@ -16789,11 +16895,11 @@ - TTreeNode is a single item that holds data in TTreeView + Contains data for an item displayed in a TTreeView control

    - A TTreeNode is part of a TTreeView and is used for storing data. This can be done by using the Caption property or for more complex data the Data property can be used. Each node can have sibling or child items associated with it. + A TTreeNode is part of a TTreeView and is used to store the data displayed in the control. This can be done by using the Text property or for more complex data the Data property can be used. Each node can have sibling or child items associated with it.

    @@ -16801,6 +16907,7 @@
    + @@ -16823,518 +16930,145 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + Performs a change notification for the node with the specified reason + +

    + Calls the NodeChanged method in the associated TreeView control. +

    +
    + + + +
    - + Indicates the property value that was changed in the tree node Gets the owner of the object instance - + +

    + The return value contains the TTreeNodes container which owns the class instance. +

    +
    @@ -17357,10 +17091,24 @@ - - Destroy - destructor for TTreeNode: unbinds all references, frees data and calls inherited Destroy - - + Destructor for the class instance + +

    + Destroy is the overridden destructor for TTreeNode. +

    +

    + It notifies the owner ( the TTreeNodes container) that the tree node and its accessibility object are being deleted. The Unbind method is called to remove any references to the node in the parent and sibling nodes, or as a selection in TreeNodes. +

    +

    + Child nodes are removed by setting HasChildren to False. Child nodes in Items are freed, and its storage is set to Nil. +

    +

    + The Pointer in the Data property is set to Nil. +

    +

    + Destroy calls the inherited method prior to exit. +

    +
    TPersistent.Destroy @@ -17368,51 +17116,74 @@ - AlphaSort - if True, sorted alphabetically + Sorts the top-level child nodes in Items - - + +

    + Calls the CustomSort method to perform the default sort algorithm (alphabetic). +

    +

    + The return value is the result from the CustomSort method, and contains True on success. +

    +
    + + + +
    - + True on success - Bottom - returns the position of the displayed tree structure (whether or not it is expanded) + Gets the vertical coordinate for the bottom of the tree node - + +

    + Bottom is an Integer function used to get the vertical coordinate for the bottom of the tree node. The return value is calculated as the sum of the Top and Height properties. +

    +
    - + Bottom coordinate for the tree node - BottomExpanded - returns the position of the bottom of the fully expanded tree structure + Gets the bottom coordinate for the last visible, expanded child node in the subtree - + +

    + BottomExpanded is an Integer function used to get the bottom coordinate for the node subtree when it is expanded. +

    +

    + If the tree node has a visible sibling, the value in its Top property is used as the return value. When a sibling node does not exist, the bottom coordinate for the last visible and expanded child node is used. If the current node does not have child nodes, the value in the Bottom property is used as the return value. +

    +
    - + Bottom coordinate for the last node in the subtree CustomSort - Sorts the child nodes using SortProc.

    - The child nodes (not the grand children) are sorted. If SortProc is nil the method DefaultTreeViewSort is used. The default implementation always returns true. + The child nodes (but not the grand-children) are sorted. If SortProc is Nil the method DefaultTreeViewSort is used. The default implementation always returns True.

    - + Always returns True - + + Sorting algorithm executed in the method, or Nil to use the default procedure + @@ -17452,7 +17223,7 @@ - DisplayExpandSignLeft - returns the position of the left edge of the expand sign + DisplayExpandSignLeft - returns the position of the left edge of the expand / collapse indicator @@ -17469,7 +17240,7 @@ - + Rectangle with the display area for the expand / collapse indicator @@ -17480,7 +17251,7 @@ - + Rectangle with the display area for the expand / collapse indicator @@ -17542,37 +17313,73 @@ - - + + Edits the text for the node in the associated TreeView control + + +

    + EditText is a Boolean function used to start editing the Text for the tree node in the associated TreeView control. The return value is True when TreeView has been assigned and the value tvsIsEditing is present in the States property for the tree view control. +

    +

    + EditText calls the BeginEditing method in TreeView to configure, display, and activate the editor for the node. +

    +

    + Use EndEdit to close and optionally cancel the editing process in the associated TreeView control. +

    +
    - + True if editing was enabled for the tree node in the method - - FindNode - returns the node containing the specified text string - - - + Gets the child node in Items with the specified text + +

    + FindNode is a TTreeNode function used to get the child node with the text specified in NodeText. +

    +

    + FindNode examines the child nodes found in the Items property for the class instance. The GetFirstChild method is called to get the first child node in Items. Each tree node in Items is examined after calling GetNextSibling until a node with the requested value is located. The return value is the TTreeNode instance with a Text property that matches the value in NodeText, or Nil if a tree node is not found. +

    +

    + Use methods in the TTreeNodes container to locate tree nodes not in the current subtree; i. e. FindNodeWithText or FindNodeWithTextPath. +

    +
    + + + + + + +
    - + + The TTreeNode instance in Items with the specified value, or Nil if not found + - + Text for the node to retrieve from Items - - GetFirstChild - returns the first child node of this parent - - + Gets the first child node in the Items property + +

    + GetFirstChild is a TTreeNode function used to get the first child node in the subtree for the current tree node. GetFirstChild returns the first TTreeNode instance stored in the Items property (index position 0). The return value is Nil if Items is empty (Count is 0). +

    +

    + Use GetFirstVisibleChild to get the first child node with its Visible property set to True. +

    +

    + Use GetFirstSibling, GetNextSibling, GetPrevSibling, or GetLastSibling to retrieve a tree node at the same level in the tree hierarchy. +

    +
    - + First tree node in the Items property, or Nil when Items is empty @@ -17596,8 +17403,23 @@ - - + + Gets the tree node that is the first visible child node in the subtree + + +

    + GetFirstVisibleChild is a TTreeNode function used to get the tree node that is the first visible child node in the subtree. +

    +

    + GetFirstVisibleChild calls GetFirstChild to retrieve the first child node in Items. If the first child node is not visible, each of the TTreeNode instances in Items is examined after calling GetNextVisibleSibling. +

    +

    + The return value is the first TTreeNode instance with its Visible property set to True. The return value is Nil if no visible child node was found in Items. +

    +

    + Use GetLastVisibleChild to retrieve the last visible child node in Items. +

    +
    @@ -17606,29 +17428,35 @@ - GetHandle - returns the operating system Handle for the current node + Gets the value for the Handle property - - + +

    + GetHandle is a THandle function used to get the value for the Handle property. It is the Handle allocated for the associated TreeView control. +

    +
    + + +
    - + Value for the property - GetLastChild - returns the last child node of this parent + Gets the last node that is a top-level child node in the subtree - + TTreeNode instance that is the list node in Items - GetLastSibling - returns the last node at the same level as the current node + Gets the last node at the same level as the current node @@ -17649,7 +17477,9 @@ - + + Gets the last child node in Items with its Visible property set to True + @@ -17659,7 +17489,7 @@ - GetNext - returns the next node in the list + Gets the next node in the tree @@ -17726,18 +17556,31 @@ - GetNextVisible - returns the next visible (i.e. not hidden) node + Gets the next visible node - + +

    + GetNextVisible is a TTreeNode function used to get the next visible node for the current tree node. +

    +

    + If the current tree node is Expanded and Visible, the next node is the first visible child node. Otherwise, the next visible sibling node is used as the next node. If a sibling node does not exist, the Parent is searched for a visible sibling (next visible ancestor?). +

    +

    + The return value is Nil if a visible node is not found using the preceding logic, or when none of the ancestor nodes are visible and expanded. +

    +
    - + Next node in the tree node navigation order, or Nil - - + + Gets the next visible node at the same level in the tree + + + @@ -17760,7 +17603,7 @@ - GetPrev - returns the previous node in the list + Gets the previous node in the tree @@ -17771,16 +17614,16 @@ - GetPrevChild - returns the previous child node of the parent specified by AValue + Gets the previous child node starting at the specified child node - + Node which is the previous child node - + Node which is the previous sibling for the specified child, or Nil @@ -17828,7 +17671,7 @@ - + Gets the previous visible sibling tree node for the current node @@ -17846,7 +17689,7 @@ - HasAsParent - returns True if the node specified by AValue has a parent + HasAsParent - returns True if the node specified by AValue has a parent node @@ -17860,16 +17703,22 @@ - IndexOf - returns the index of the node specified by AValue + Get the index position for the specified child tree node - + +

    + The return value is -1 if the tree node in AValue is not a child node (its Parent node is not the current class instance). Calls GetIndex to calculate the position of the child node relative to previous sibling nodes. Roughly equivalent to calling IndexOf in the Items container, but using a TTreeNode search value instead of a String. +

    +
    - + + Ordinal position for the specified child node, or -1 when not a child node + - + Child node to locate in Items @@ -17896,18 +17745,18 @@
    - + Persistent object with properties copied in the method - Collapse - method for collapsing tree view to show only the main stems. Apply recursively if Recurse is True + Collapses the current tree node, and optionally collapses any descendent nodes - + True to collapses all descendent nodes in the subtree @@ -17920,10 +17769,16 @@ - Delete the current TreeNode + Frees the current tree node when the Deleting property is not True - - + +

    + Delete is a method used to remove the tree node from the TTreeNodes container. Delete calls Free to destroy the object instance if the Deleting property is not set to True. No actions are performed when Deleting is True. +

    +
    + + +
    @@ -17936,45 +17791,53 @@ - EndEdit (to be implemented) + Ends editing of the tree node in the associated tree view control - + True if the edited value for Text is discarded - Expand - method for expanding the current node. If Recurse is True, also expand all descendent nodes + Expands the current tree node, and optionally all descendent nodes - + +

    + Calls the ExpandItem method to implement the expansion and optional recursion. +

    +
    - + True to expand all descendent nodes - ExpandParents - apply expansion to the parents of the current node + Expands any tree node which is an ancestor of the current node - + Frees the Pointer in Data, including any child nodes in Items - MakeVisible - method for rendering a node visible + Forces the node tree node to become visible - + +

    + Calls the EnsureNodeIsVisible method in the associated TreeView (when assigned). Otherwise, calls the ExpandParents method. +

    +
    @@ -18023,7 +17886,7 @@ - Update the contents and appearance of the current node + Redraws the associated TreeView control if an update is not already in progress @@ -18053,134 +17916,252 @@ - Count - the number of nodes + The number of nodes where the current node is the parent node - + + Contains the same value as the Count property in Items. + + Are you sure? - Cut - whether the node has been Cut + Indicates if the tree node has been cut from the tree structure - + +

    + Cut is a Boolean property which indicates if the tree node has been cut from the tree structure. The property value is True when nsCut has been included in the States property for the tree node. Changing the value for the property causes the States property to be updated to include or exclude the node state value. +

    +
    + + Pointer to the custom data for the node + - Property of type pointer used to store custom data in a node. +

    + Data is a Pointer property with a pointer to the custom data for the node. Data can contain any arbitrary data type, and must be cast to the correct types when used in an application. +

    +

    + Setting a new value for the property causes the associated TreeView (when assigned) to sort the parent node or all of the TreeNodes when needed and allowed. It is needed when the tree view uses SortType stData or stBoth. It is allowed if the node is not being deleted and is bound to other tree nodes (States). +

    +

    + The Changed method is called with the ncDataChanged node change reason. +

    - - Data - pointer to the Node's data -
    - Deleting - if True, the node is being deleted + True if the node has been marked for deletion in the associated tree view control - + +

    + Deleting is a read-only Boolean property which indicates is the node is marked for deletion. Its value is True when ndDeleting has been included in the States property for the node. nsDeleting is added to States in the Destroy method, and indicates that the node will be freed. The Delete method in the TreeView control is called to signal an OnDeletion event (when assigned) before references for the node are removed and the TreeNodes are refreshed. It prevents the Delete method from being executed more than once. +

    +
    - DropTarget - if True, the current node is a target for a drop process + True if the node is a drop target in a drag and drop operation - + +

    + DropTarget is a Boolean property which indicates if the node is a drop target in a drag and drop operation. The value for the property is True when nsDropHilited has been included in the States property. +

    +

    + Setting a new value for the property causes States to be updated to reflect the new value. When set to True, nsDropHilited is included in State and the internal last drop target is updated in the associated TreeView control. When set to False, nsDropHilited is excluded from States and the last drop target is set to Nil in the TreeView control. +

    +
    - Expanded - if True, the node has been expanded + True if the node has been expanded, False when collapsed - + +

    + Expanded is a Boolean property which indicates if the node has been expanded in the associated TreeView control. The property value is True when nsExpanded has been included in the States property. +

    +

    + The Expand method is called when the new value for the property is True. Otherwise, the Collapse method is called. States is updated in the Expand and Collapse methods. +

    +
    - Focused - if True, the node has received focus + True if the node has focus in the TreeView control - + +

    + Focused is a Boolean property which indicates if the node has focus in the associated TreeView control. The value for the property is True when nsFocused has been included in the States property. +

    +

    + Setting a new value for the property causes the values in States to be updated. When set to True, nsFocused is included in States. When set to False, nsFocused is excluded from States. The Update method is called to force the TreeView control to be redrawn. +

    +
    - Handle - the operating system handle for this node + Handle for the tree view control which owns the TreeNodes container and the tree node - + +

    + THandle is a read-only THandle property with the handle assigned for the associated TreeView control. The property value is 0 (zero) if a handle has not been assigned for the TreeView control. +

    +
    - HasChildren - if true, this node has descendent nodes + Indicates whether the tree node has child nodes - + +

    + HasChildren is a Boolean property which indicates whether the tree node has child nodes. +

    +

    + The property value is True when States includes the value nsHasChildren. Items is not used to determine the property value. +

    +

    + Setting a new value for the property causes States to be updated to include or exclude nsHasChildren to reflect the new value. When the value is False, child nodes in the Items property are freed. +

    +

    + The Update method is called to refresh the associated TreeView control (when assigned). +

    +
    - The Height of the current node + The height for the node including its text, images, and indicators - + +

    + Height is an Integer property with the height for the node including its text, images, and indicators. +

    +

    + Height uses a default value if it contains 0 (zero) or a negative integer value. If an associated TreeView control has been assigned, the value in its DefaultItemHeight property is used as the property value. If TreeView in unassigned, the value in the DefaultTreeNodeHeight constant is used. +

    +

    + Setting a new value for the property causes the States property in the associated TreeView control to be updated (when assigned). The values tvsScrollbarChanged and tvsTopsNeedsUpdate are included in the control States. The Update method is called to force the TreeView to be redrawn. The Changed method is called with the ncHeightChanged node change reason. +

    +

    + Height is used along with Top to calculate the return value for the Bottom method. It is also used in the implementation of methods like DisplayRect and DisplayExpandSignRect. +

    +
    - ImageIndex - the image index of the current node if not selected. Default -1 for no image + Ordinal position for the image displayed for the node, or -1 when no image is assigned - + +

    + ImageIndex is an Integer property with the ordinal position for the image displayed for the node. It refers to a bitmap stored in the Images property of the associated TreeView control. The default value for the property is -1, and indicates that an image has not been assigned. +

    +

    + Setting a new value for the property causes the Update method to be called to redraw the associated tree view control. The Changed method is called with the ncImageIndex node change reason. +

    +
    - TTreeNode.SelectedIndex + + +
    - The Index value of the current node + Ordinal position for the node in its parent node - + + Returns the number of previous siblings (nodes on same level in the parent node). + - IsFullHeightVisible - if True, the full height of the TreeNode is visible within the display window + True if the entire node is visible in the display area for the associated TreeView control - + +

    + IsFullHeightVisible is a read-only Boolean property which indicates if the entire tree node is visible in the display area for the associated TreeView control. +

    +

    + The IsNodeHeightFullVisible method in TreeView is called to get the value for the property. If the TreeView control has not been assigned, the AreParentsExpandedAndVisible method is used to get the return value. +

    +

    + IsFullHeightVisible is used in the SelectionVisible method in TCustomTreeView when MultiSelect has not been enabled for the tree view control. +

    +
    - IsVisible - if True, the current node is visible (not hidden) + True if the node is visible - + +

    + IsVisible is a read-only Boolean property which indicates if the tree node is visible in the associated TreeView control. IsVisible is True if the node can be seen in the display area for the control. The property value is False when an ancestor node is collapsed (not Expanded). +

    +

    + The IsNodeVisible method in TreeView is called to get the value for the property. If TreeView has not been assigned, the AreParentsExpandedAndVisible method is called to get the property value. +

    +

    + IsNodeVisible is used in the Repaint method in TTreeNodes, and in the SelectionVisible method in TCustomTreeView. +

    +
    - Items - the index of the current node within the list of items + Provides indexed access to the child nodes for the current node - + +

    + Items is an indexed TTreeNode property which provides access to the child nodes for the current node by their ordinal position. ItemIndex contains the ordinal position for the tree node instance, and must be in the range 0..Items.Count-1. An ETreeNodeError exception is raised if ItemIndex is not in the range needed for the Items property. +

    +

    + Items is the default property for the class instance. +

    +

    + Storing a new value to the indexed property causes the Assign method in the TTreeNode instance to be called to copy the properties values. +

    +
    - + Ordinal position for a child node - The descendency level or indentation for the tree node - + The number of ancestor nodes for the current tree node + +

    + Level is a read-only Integer property which contains the level in the tree structure for the node. It indicates the number of ancestor nodes in the structure, and implies the indentation for the node in the tree view control. +

    +

    + The root of the tree is level 0. The value for the property is determined by counting the number of Parent nodes for each TTreeNode instance in the tree starting at the current node. +

    +
    @@ -18193,14 +18174,16 @@
    - + + Graphic drawing effect applied to the node in the associated TreeView control + - OverlayIndex - the index of the overlay + Ordinal position for the overlay image used for the node This icon is drawn above the normal icon. If Images.HasOverlays then it is fetched from Images via Images.Overlay(Node.Overlay) for Delphi compatibility. @@ -18209,30 +18192,67 @@ - The Owner control of the current TreeNode - + + Owner of the tree node instance + + +

    + Owner is a read-only TTreeNodes property with the container that owns the current TTreeNode instance. +

    +
    - The Parent of the current node - + + Parent node for the current tree node + + +

    + Parent is a read-only TTreeNode property which contains the parent node for the current tree node. +

    +

    + Use Items to access and maintain the child nodes for the current tree node. +

    +
    - Selected - if True, the current node has been selected + True if the current node is selected in the tree view control - - + +

    + Selected is a Boolean property which indicates the current node is selected in the associated TreeView control. The property value is True when nsSelected or nsMultiSelected has been included in the States property. nsSelected indicates that the node is assigned to the TCustomTreeView.Selected property. nsMultiSelected indicates that the node is stored in the the TCustomTreeView.Selections property when it has MultiSelect enabled. +

    +

    + Setting a new value for the property causes the values in States to be updated. Similarly, the TreeView control is updated to used the node in the Selected or Selections property. +

    +

    + The Update method is called to force the TreeView control to be redrawn. +

    +
    + + +
    - SelectedIndex - the image index of the current node if selected. Default -1 for no image + Ordinal position for the image displayed when the tree node is Selected - + +

    + SelectedIndex is an Integer property with the ordinal position for the image displayed when the node is Selected. It refers to a bitmap in the Images property for the TreeView control, and allows an alternate image to be displayed for the node when it is selected. The default value is -1 and indicates that an image index has not been assigned. +

    +

    + Changing the value in the property causes the Update method to be called to redraw the associated TreeView control. The Changed method is called with the ncSelectedIndex node change reason. +

    +

    + Use ImageIndex to set the ordinal position for the image displayed when the tree node is not selected. +

    +
    @@ -18255,51 +18275,133 @@
    - - - + + Contains active state flags for the tree node + + +

    + States is a read-only TNodeStates properties which contains active state flags for the tree node. TNodeState enumeration values are included in or excluded from the set type as needed in methods for the tree node, the TreeNodes container, and the associated TreeView control. +

    +
    + + + +
    - SubTreeCount - the number of sub-trees + The number of subtrees in the ancestor nodes for the class instance - The Text string of the current node - + + Text displayed for the tree node + + +

    + Text is a String property which contains the text displayed as the caption for the tree node. +

    +

    + Changing the value in the property causes the TreeView control to be updated. Its States property is modified to include the value tvsMaxRightNeedsUpdate, which causes the node sizes to be recalculated and the control to be re-displayed. +

    +

    + If the SortType for the TreeView is set to stText or stBoth, the Parent node is re-sorted. If the TreeView has not been assigned, the TreeNodes container is re-sorted. +

    +

    + The Changed method is called with the ncTextChanged node change reason. +

    +
    - The position of the Top of the current node - - + + Vertical coordinate for the top of the tree node + + +

    + Top is a read-only Integer property with the vertical coordinate for the top of the tree node. Top contains an Y-axis offset where the tree node is located in the display area for the associated TreeView control. +

    +

    + The property value is calculated by calling the UpdateAllTops method in the TreeView control. The value contains the accumulated Height for all preceding TreeNodes starting at the first visible node in the control, and reflects their Visible and Expanded settings. The value is calculated in UpdateAllTops when tvsTopsNeedsUpdate has been included in the States property for the TreeView control. +

    +

    + Use Height to get height for the text, images, and indicators used in a tree node. Use Bottom to get the vertical coordinate for the bottom of the tree node. +

    +
    + + + +
    - the collection of TreeNodes to which this node belongs - - + + The container where the tree node is stored, and the owner of the class instance + + +

    + TreeNodes is a read-only TTreeNodes property with the container where the tree node is stored, and the owner of the TTreeNode instance. TreeNodes provides properties and methods needed to store, access, and maintain the tree nodes for the TreeView control. TreeNodes is a reference to the Items property found in TreeView. +

    +

    + The property value is Nil if Owner has not been assigned or is not derived from TTreeNodes. +

    +
    + + + + + +
    - The TreeView to which this node belongs - - + + The tree view control where the node is displayed + + +

    + TreeView is a read-only TCustomTreeView property with the tree view control where the tree node and other nodes in TreeNodes are displayed. It is a reference to the Owner assigned to the TreeNodes property. +

    +

    + TreeView provides access to the properties, methods, and events in the control. It is used to get the position for the node in the display area for the control. It is also notified when property values in the node are changed. +

    +

    + Use TreeNodes to access the TTreeNode instances stored in TreeView. +

    +
    + + + + + +
    - - + + True if the tree node is visible in the associated TreeView control + + +

    + Visible is a Boolean property which indicates if the tree node is visible in the associated TreeView control. Its value is True when nsVisible has been included in the States property for the tree node. The default value for the property is True. +

    +

    + Setting a new value for the property causes the States property to be udpated. Selected is set to False when the value in Visible is changed. +

    +

    + Values are included in the States property for the associated TreeView control (when assigned) to indicate that the size and layout for the tree nodes in the control have been changed. The Update method is called to force the control to be refreshed. The Changed method is called with the ncVisibility node change reason. +

    +
    - Implements an enumerator for items in the TTreeNodes collection + Implements an enumerator for items in the TTreeNodes container @@ -18308,35 +18410,58 @@ - + Gets the value for the Current property - + + + - + Value for the property - - - + Constructor for the class instance + +

    + Create is the constructor for the class instance, and calls the inherited method on entry. Create stores the value in ANodes in the TTreeNodes member. Creates set the default value for the internal position counter used in the class instance. +

    +
    + + +
    - + Container with the tree nodes visited in the enumerator - - - + Indicates if another tree node is available to the enumerator + +

    + MoveNext is a Boolean function which indicates if another tree node is available to the enumerator. MoveNext increments the internal position counter for the enumerator. The return value is True if the position counter is less than the number of entries in the internal TTreeNodes container (in the range 0..TTreeNodes.Count-1). +

    +

    + Use Current to access the TTreeNode instance when MoveNext returns True. +

    +
    + + + + +
    - + True when more tree nodes are available in the internal container - - + Gets the current tree node instance for the enumerator + +

    + Use MoveNext to navigate to the first or subsequent TTreeNode instance for the enumerator. Raises an exception if Current is accessed before the MoveNext method is called to retrieve the first value for the enumerator. +

    +
    @@ -18370,10 +18495,27 @@ - A collection or list of TTreeNode instances + Implements a container for TTreeNode instances - - + +

    + TTreeNodes is a TPersistent descendant which implements a container used to store TTreeNode instances. TTreeNodes provides properties and methods used to create, store, access, and maintain nodes with a hierarchical tree structure. +

    +

    + The indexed Item property provides access to the nodes in the container by their ordinal position. An enumerator can also be used to access tree nodes in the container. +

    +

    + TTreeNodes is the type used for the Items property in TCustomTreeView. +

    +
    + + + + + + + Mention internals like node cache and selection list? +
    @@ -18390,12 +18532,8 @@ - - - - - - + + Gets the handle for the TreeView component using the collection of nodes @@ -18405,137 +18543,37 @@ The handle for the TreeView, or 0 when TreeView is unassigned - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -18570,20 +18608,22 @@ - - GetCount - returns the number of nodes in the collection - + Gets the value for the Count property - + + + Value for the Count property - Gets the TPersistent instance which owns the collection and its nodes + Gets the value for the Owner property - + + + Owner of the collection @@ -18591,24 +18631,27 @@ - SetItem - method for recording details of specified node + Assigns values from the specified tree node to a node in the container - + Ordinal position for the node updated in the container - + Tree node with the values assigned to an existing node in the container - - Create - constructor for TTreeNodes: calls inherited Create - - + Constructor for the class instance + +

    + Create is the constructor for the class instance, and calls the inherited method on entry. Create allocates resources for the internal selection list in the class instance. The value in AnOwner is stored in the Owner property. +

    +
    + TObject.Create
    @@ -18617,47 +18660,60 @@
    - - Destroy - destructor for TTreeNodes: calls inherited Destroy - - + Destructor for the class instance + +

    + Destroy is the overridden destructor for the class instance. Destroy calls Clear to remove TTreeNode instances stored in Item and values in the internal cache. The selection list for the class instance is also cleared, and its allocated resources are freed. Destroy calls the inherited method prior to exit. +

    +
    + + + + + TPersistent.Destroy
    - Add - adds a sibling node with specified text string and returns the new node + Adds a new tree node as a sibling of the specified node - + Tree node created and added in the method - + Tree node that is a sibling of the new node - + Text for the new tree node + + + Pointer to the data for the new tree node + + + Indicates the position for the new node relative to its sibling(s) - AddChild - adds a child node with specified text to the parent node and returns the new node + Adds a node tree with the specified text as a child of the specified parent node - + TTreeNode instance created in the method - + Parent node for the new node - + Text for the new tree node @@ -18814,7 +18870,7 @@ - FindNodeWithText - returns a node containing the specified text string + Finds a node containing the specified text string @@ -18827,38 +18883,49 @@ - - + + Finds a node with the text ancestry specified in TextPath + + +

    + Returns the TTreeNode instance found which matches the text ancestry in TextPath, or Nil if a tree node is not found matching the specified values. +

    +

    + TextPath contains the delimited text values used to locate a tree node. The '/' (Slash) character is used as the delimiter between text values in TextPath. An initial slash character representing the root node is not needed or allowed. The search always starts at the top-level tree nodes in the container. The FindNode method is used to locate subsequent delimited text values in TextPath. +

    +
    - + Tree nodes matching the specified text values - + Delimited text values used to locate the tree node - FindTopLvlNode - returns a top level node containing the specified text string + Gets a top-level node containing the specified text - + Tree node with the specified text, or Nil - + Text to locate in the top-level siblings - + + Gets the TTreeNodesEnumerator enumerator for the class instance + - + TTreeNodesEnumerator instance created in the method @@ -18873,7 +18940,9 @@ - + + Gets the first top-level tree node with its Visible property set to True + @@ -18894,7 +18963,7 @@ - GetLastNode - last top level node + Gets the last top-level tree node in the container @@ -18905,7 +18974,7 @@ - GetLastSubNode - absolute last node + Gets the last child or descendent node in the last top-level node @@ -18915,7 +18984,9 @@ - + + Gets the last top-level tree node with its Visible property set to True + @@ -18924,20 +18995,26 @@ - - + + Gets the tree node at the specified position in the list of selected nodes + + +

    + Raises an ETreeNodeError exception if AIndex is not a valid ordinal position in the internal selection list. AIndex must be in the range 0..SelectionCount-1. +

    +
    - + Tree node at the specified position in the selection list - + Ordinal position in the selection list for the node - Insert a node with the specified text just before the specified Next node and returns the new node + Inserts a node with the specified text before the specified node @@ -18954,7 +19031,7 @@ - InsertBehind - inserts a new node with specified text just behind specified Previous node and returns the new node + Inserts a new node with the specified text just after the specified node @@ -19011,13 +19088,15 @@ - IsMultiSelection - returns True if this node is part if a multi-selection + True if the node is part of a multi-selection in the internal selection list - + + True if the node is part of a multi-selection in the internal selection list + @@ -19035,7 +19114,7 @@ - BeginUpdate - start the update process + Starts an update process for the tree nodes in the container @@ -19043,7 +19122,7 @@ - Clear the current node + Removes tree nodes in the container and its internal cache @@ -19067,65 +19146,102 @@ - Delete this node + Removes the specified tree node from the container - + Tree node deleted in the method - EndUpdate - finish the update process + Finishes an update process for the tree nodes in the container - + + Frees the pointer in the Data property for all nodes in the container + - + + Adds or removes the specified tree node to / from the internal selections list when its Selected property is changed + - + Tree node added to or removed from the selections list - + + True to add the node, False to remove the node in the selection list + - SelectOnlyThis - method for selecting only the indicated node + Clears any existing multi-selections and selects the specified node + - Select Only This Node + Node selected in the method - - - + + Adds nodes relative the specified node to the multi-selection list + + +

    + MultiSelect is a method used add nodes to the internal selection list relative to the node specified in Node. MultiSelect uses values in the MultiSelectStyle property for the tree view control in Owner to determine the nodes added. Specifically: +

    +
    +
    msSiblingOnly
    +
    + When present, only sibling nodes are selected for the specified node. When omitted, child nodes are added to the multi-selection. +
    +
    msVisibleOnly
    +
    + When present, only visible nodes are included in the multi-selection. When omitted, all nodes are eligible regardless of their visibility. +
    +
    +

    + ClearWholeSelection indicates whether all existing nodes in the multi-selection are cleared before added new node(s) to the selection list. When set to True, the ClearMultiSelection method is called. Otherwise, the last node in the selection list is removed. +

    +

    + Nodes in the internal selection list are visited to set their MultiSelected property to True. Members used to track the first and last nodes in the multi-selection are updated prior to exit. +

    +
    + + + + + + +
    - + Tree node with the child or sibling nodes added to the selection list - + + True to remove all existing nodes in the selection list, False to remove the most recent node + - SortTopLevelNodes - sorts the top level nodes using the specified comparison method + Sorts the top-level nodes using the specified sorting procedure @@ -19148,7 +19264,7 @@ - Count - the number of nodes in the collection + Contains the number of nodes in the container @@ -19156,11 +19272,11 @@ - Item - finds the node corresponding to the given index + Provides indexed access to the TTreeNode instances in the container - + Ordinal position for the TTreeNode instance in the property value @@ -19173,21 +19289,21 @@ - Owner - the TTreeView that owns the collection of nodes + The TCustomTreeView control that is the owner of the container - + Number of tree nodes included in the internal selection list - TopLvlCount - the number of nodes at the top level of the tree structure + The number of tree nodes at the top level of the tree structure @@ -19195,13 +19311,13 @@ - TopLvlItems - the list of nodes at the top level of the tree structure + Provides indexed access to tree nodes at the top level of the tree structure - + Ordinal position for the TTreeNode instance in the property value @@ -19227,7 +19343,7 @@ - The top coordinate for visible expanded nodes needs to be recalculated + The top coordinate for visible, expanded nodes needs to be recalculated @@ -20342,7 +20458,7 @@ - True to include the tree node in Selections (when enabled), False to select only the specified node + True to include the tree node in Selections (when enabled), False to select only the specified node @@ -20355,7 +20471,7 @@ Change is a method used to perform actions needed when the selection in the control has been changed. Node contains the tree node that was used in the control selection. Change signals the OnChange event handler (when assigned).

    - Change is called from the event handler used for the internal timer activated when a new selection is made and the control synchronizes the tree nodes to the visual display. + Change is called from the event handler used for the internal timer activated when a new selection is made and the control synchronizes the tree nodes to the visual display.

    Use the OnSelectionChange event handler for the notification that occurs before the node is included in the control selection. @@ -20544,7 +20660,7 @@ Implements the Paint method for the control

    - DoPaint is a method used render the control to its canvas. It Implements the overridden Paint method. No actions are performed in the method when tvsPainting has been included in the States property (Paint has already been called). + DoPaint is a method used render the control to its canvas. It Implements the overridden Paint method. No actions are performed in the method when tvsPainting has been included in the States property (Paint has already been called).

    DoPaint includes the value tvsPainting in the States property to indicate that the paint method is active. It includes the value tvoFocusedPainting in States when Focused is True, or excludes the value when Focused is False. @@ -21634,7 +21750,7 @@ CustomSort calls BeginUpdate to minimize updates during the sorting process. EndUpdates is called when the sorting process is completed.

    - Top level nodes in Items are sorted by calling the SortTopLevelNodes in items. Child nodes are then sorted (when present), starting at the first top-level node in the tree. The ClearCache method in Items is called to invalidate the node cache for the control. + Top-level nodes in Items are sorted by calling the SortTopLevelNodes in items. Child nodes are then sorted (when present), starting at the first top-level node in the tree. The ClearCache method in Items is called to invalidate the node cache for the control.

    The States property is updated to force the node coordinates and scrollbars to be refreshed in the control. @@ -22321,7 +22437,7 @@ AText := ATreeView.Items.Item[0].Text; // caption for the first tree node Selected is a TTreeNode property which contains the selected tree node in the control. A tree node is selected when the Left or Right mouse button is clicked on the code. It can also be selected by assigning a TTreeNode instance to the property.

    - When a tree node is selected or unselected, the Selected property in the TTreeNode instance is updated. Use the OnChanging event handler to determine if a specific tree node can become the selected node in the control. Use the OnChange event handler to perform actions needed after the tree node is made the Selected node in the control. + When a tree node is selected or unselected, the Selected property in the TTreeNode instance is updated. Use the OnChanging event handler to determine if a specific tree node can become the selected node in the control. Use the OnChange event handler to perform actions needed after the tree node is made the Selected node in the control.

    Selecting a tree node forces it to become fully visible in the control. This includes expanding parent nodes to ensure that the node is visible. The OnExpanding and OnExpanded event handlers are signalled before and after actions to a given tree node. @@ -22761,25 +22877,46 @@ OldExpanded.Free; - THeaderSectionState - enumerated type containing possible selection states for THeaderSection + Enumerated type which represents selection states for THeaderSection + +

    + THeaderSectionState is the type used to implement the THeaderSection.State property. +

    +
    + + +
    - + The header section is drawn in its normal state - + The header section is drawn in its "hot-lighted" state - + The header section is drawn in its "pressed" state - THeaderSection - the individual sections of a THeaderControl, each of which can be used to control its own option, selection etc + Implements a section displayed on a TCustomHeaderControl / THeaderControl instance - - + +

    + THeaderSection is a TCollectionItem descendant which implements a section displayed on a TCustomHeaderControl / THeaderControl instance. THeaderSection is the type added and maintained in the THeaderSections collection, and used in the TCustomHeaderControl.Sections property. +

    +

    + THeaderSection has properties which identify its visual characteristics. This includes the text displayed for the section, its alignment, minimum and maximum widths, and an index for an optional image. Other properties contain run-time information about the section, including its left and right coordinates and its display state. +

    +

    + THeaderSection instances are normally created at design-time and edited using the IDE object inspector. They can be created at run-time using methods in the THeaderSections collection, and edited in code. +

    +
    + + + +
    @@ -22798,7 +22935,7 @@ OldExpanded.Free; - + Value for the property @@ -22807,7 +22944,7 @@ OldExpanded.Free; - + Value for the property @@ -22816,7 +22953,7 @@ OldExpanded.Free; - + Value for the property @@ -22825,7 +22962,7 @@ OldExpanded.Free; - + New value for the property @@ -22834,7 +22971,7 @@ OldExpanded.Free; - + New value for the property @@ -22843,7 +22980,7 @@ OldExpanded.Free; - + New value for the property @@ -22852,7 +22989,7 @@ OldExpanded.Free; - + New value for the property @@ -22861,7 +22998,7 @@ OldExpanded.Free; - + New value for the property @@ -22870,7 +23007,7 @@ OldExpanded.Free; - + New value for the property @@ -22879,7 +23016,7 @@ OldExpanded.Free; - + New value for the property @@ -22888,7 +23025,7 @@ OldExpanded.Free; - + New value for the property @@ -22905,19 +23042,23 @@ OldExpanded.Free; - + Display name for the collection item - - Create - constructor for THeaderSection: calls inherited Create then initializes state, visibility, alignment, size and Index - + Constructor for the class instance + +

    + Create is the overridden constructor for THeaderSection, and + calls the inherited Create method on entry. The value in ACollection is used as the Owner of the collection item. Create sets the default values for properties in the class instance. +

    +
    TCollectionItem.Create
    - + Collection which owns the class instance @@ -22994,14 +23135,27 @@ OldExpanded.Free; - THeaderSectionClass - class of THeaderSection + Class reference used to create new THeaderSection instances - THeaderSections - a collection of Items to type THeaderSection, the individual parts of a THeaderControl + Implements a collection for section in a TCustomHeaderControl control + +

    + THeaderSections is a TCollection descendant used to store sections defined for a TCustomHeaderControl instance. THeaderSections is the type used to implement the Sections property in TCustomHeaderControl. +

    +

    + THeaderSections re-implements methods from the ancestor class that are used to add, insert, delete, and retrieve THeaderSection instances stored in the collection. +

    +
    + + + + TCollection +
    @@ -23038,21 +23192,21 @@ OldExpanded.Free; - GetOwner returns a HeaderControl, overriding inherited value + Gets the Owner of the class instance TPersistent.GetOwner - + Owner of the class instance Performs actions needed when a collection item has been changed

    - Update is an overridden method used to notify observers of a change to the specified item in the collection. + Update is an overridden method used to update the section in the header control. When Item is assigned, the UpdateSection method in the THeaderControl instance is called. If Item is unassigned (contains Nil), the UpdateSections method in the THeaderControl instance is called update all sections in the collection.

    Update does not call the inherited method which notifies observers of the change. @@ -23060,10 +23214,11 @@ OldExpanded.Free;
    TCollection.Update + TPersistent.FPONotifyObservers
    - Item updated in the collection + Section updated in the collection for the header control @@ -23088,29 +23243,36 @@ OldExpanded.Free; - AddItem - adds a HeaderSection to the Header at the position specified by Index + Adds the specified header section at the position specified in Index + +

    + The THeaderSection instance in Item is created when the argument value is Nil (unassigned). The return value contains the new header section instance, or the existing value in Item when it is assigned. +

    +
    - + Header section created (optional) and stored in the method - + Header section to add in the method, or Nil to create a new one - + Ordinal position in the collection where the header section is stored - Insert a new collection item at the specified position in the collection + Inserts a new collection item at the specified position in the collection - + Header section created in the method - + + Ordinal position in the collection where the new header section is inserted + @@ -23121,31 +23283,42 @@ OldExpanded.Free; - + Ordinal position for the collection item deleted in the method Items - the series of individual HeaderSections in the collection + +

    + Items is an indexed THeaderSection property which provides access to the header sections in the collection by their ordinal position. It is implemented using TFpList to store the collection items. Items is the default property for the class instance. +

    +

    + When reading a value in the property, the item is cast to the THeaderSection type used in the collection. SetItem is called to store a value for the indexed property. +

    +
    + + +
    - + Ordinal position in the collection for the property value - TSectionTrackState - enumerated type for tracking the state of a header section + Enumerated type with tracking states for a header section - + Mouse tracking for a section is enabled - + Mouse tracking for a section drag operation is enabled - + Mouse tracking for a section is disabled @@ -23217,7 +23390,7 @@ OldExpanded.Free; TCustomHeaderControl - base class for THeaderControl, a header strip of user-designed sections which allow selection of pages or actions.

    - THeaderControl offers a widget that could be placed along the edge of a Panel or Form allowing a highly customized mechanism for selection. However there are no intrinsically associated display areas and it is the developer's responsibility to supply an index associated with the selection from the THeaderControl and determining what action is to occur or what is to be displayed in any attached Panel or Form. + THeaderControl offers a widget that could be placed along the edge of a Panel or Form allowing a highly customized mechanism for selection. However, there are no intrinsically associated display areas and it is the developer's responsibility to supply an index associated with the selection from the THeaderControl and determining what action is to occur or what is to be displayed in any attached Panel or Form.

    @@ -23302,24 +23475,24 @@ OldExpanded.Free; - CreateSection - method for creating a header section + Creates a new header section for the control - + THeaderSection instance created in the method - CreateSections - method for creating a collection of header sections + Creates the collection used to store header sections defined in the control - + THeaderSections instance created in the method @@ -23328,49 +23501,77 @@ OldExpanded.Free; - SectionClick - method for emulating the OnSectionClick event + Performs actions needed when the mouse is clicked on the specified header section - - + +

    + Signals the OnSectionClick event handler (when assigned). Called from the Click method when the mouse event occurred on the header section in the Section argument. +

    +
    + + + + +
    - + Header section for the mouse event - SectionResize - method for emulating the OnSectionResize event + Performs actions needed to resize the specified header section - + +

    + Signals the OnSectionResize event handler (when assigned). Called from the MouseUp method when mouse tracking has been ended for the specified Section. +

    +
    - + Header section for the resize action - SectionTrack - method for emulating the OnSectionTrack event + Performs actions needed when the mouse tracking state for a header section has changed - - + +

    + Signals the OnSectionTrack event handler (when assigned). Called from the MouseDown, MouseMove, and MouseUp methods when mouse tracking is active for a section in the header control. +

    +
    + + + + + +
    - + Header section for the mouse tracking state - + New mouse tracking state for the action - SectionSeparatorDblClick - method for emulating the OnSectionSeparatorDblClick event + Performs actions to handle a mouse double click event for the specified header section - - + +

    + Signals the OnSectionSeparatorDblClick event handler (when assigned). Called from the DblClick method when the mouse event occurs when mouse tracking has been enabled for the header control. +

    +
    + + + +
    - + Header section for the double click mouse event @@ -23414,7 +23615,7 @@ OldExpanded.Free; - GetControlClassDefaultSize - returns its own defaults, overriding inherited values + Gets the default size for new instances of the class TControl.GetControlClassDefaultSize @@ -23452,12 +23653,21 @@ OldExpanded.Free; - Create - constructor for TCustomHeaderControl: calls inherited Create, creates the sections and initializes style and bounds + Constructor for the class instance - + +

    + Create is the overridden constructor for TCustomHeaderControl, and calls the inherited Create on entry. +

    +

    + Create allocates resources needed for the Sections property by call CreateSections. It also sets the default size for the control using the values returned from GetControlClassDefaultSize. +

    +

    + The control style flags are updated in the method to include mouse capture and click events and to remove caption display for the control. +

    +
    TCustomControl.Create - TComponent.Create
    @@ -23466,12 +23676,15 @@ OldExpanded.Free; - Destroy - destructor for TCustomHeaderControl: frees sections then calls inherited Destroy + Destructor for the class instance - + +

    + Destroy is the overridden destructor for TCustomHeaderControl. It ensures that resources allocated to the Sections property are freed, and calls the inherited method prior to exit. +

    +
    TCustomControl.Destroy - TComponent.Destroy
    @@ -23480,37 +23693,97 @@ OldExpanded.Free; - GetSectionAt - find the index for the section located at point P + Gets the header section at the position specified in P - + +

    + GetSectionAt is an Integer function used to get the position for the header section found at the coordinates in P. +

    +

    + GetSectionAt iterates over the THeaderSection instances in Sections to find a matching collection item. A match is found when the X- axis coordinate in P is within the Left and Right values for the header section. +

    +

    + The return value contains the ordinal position in Sections where the header section is stored, or -1 if a header section was not found for the coordinates. +

    +
    - + Ordinal position in Sections for the header section - + TPoint instance with the coordinates examined in the method - + + + Draws the control to its Canvas using highlighting, drag images, and theme details + + +

    + Paint is an overridden method in TCustomHeaderControl used to draw the control to its Canvas. +

    +

    + Paint calls the inherited method on entry to signal the OnPaint event handler (when assigned). The display rectangle is updated to reflect the current Width and Height for the control. +

    +

    + Paint iterates over the header sections defined in the Sections property, and calls PaintSection to render each one. If all sections fit within the control display area without scrolling, theme services are used to draw the control to the control to its Canvas. +

    +

    + Paint handles configuring the Canvas and drawing the preview when a section drag operation is in effect. +

    +

    + See PaintSection for more information about the actions performed to draw an individual header section for the control. +

    +
    + + TCustomControl.Paint + +
    - PaintSection - method for painting the current section (specified by Index) of the Header + Paints the specified header section to the Canvas for the control - + +

    + PaintSection is a method used to paint the specified header section to the Canvas for the THeaderControl control. +

    +

    + Index contains the ordinal position for the THeaderSection instance in the Sections collection. No actions are performed in the method if the header section is not Visible. +

    +

    + PaintSection draws the header section using the Left and Right properties in the THeaderSection instance. The value in its State property is used to render the section by calling methods in ThemeServices. When Images have been assigned in the control, and the header section has an assigned image index, it is drawn to the Canvas. When Text contains a non-empty value, it is also rendered to the Canvas using the DrawText method in ThemeServices. +

    +
    - + Ordinal position for the header section rendered in the method - + + + Scales the width of the header sections in the control using the specified multiplier and divisor + + +

    + ChangeScale is an overridden method in TCustomHeaderControl, and calls the inherited method on entry to scale the overall size for the control and its child controls. ChangeScale applies the scaling factor represented by M and D to the individual header sections defined in the Sections collection. The Width for each THeaderSection instance is updated using the multiplier and divisor to scale the section width. +

    +
    + + + + + + TWinControl.ChangeScale + +
    - + Multiplier for the scaling factor - + Divisor for the scaling factor @@ -23521,15 +23794,26 @@ OldExpanded.Free; - Images is the list of Images available for selection using this tool + Contains bitmaps displayed on the header sections for the control - + +

    + The control cannot display images on the header section if Images has not been assigned or is empty. +

    +

    + Use the ImageIndex property for the THeaderSection instances in Sections to assign the image used for the header section. +

    +
    Specifies the width for Images displayed in the header control - + +

    + If ImagesWidth is unassigned (contains 0), the width of the bitmaps in Images is used. +

    +
    @@ -23537,6 +23821,15 @@ OldExpanded.Free; Sections - the short segments of the header separated by vertical bars that function as the elementary selection units of the header + +

    + Sections is a THeaderSections property with the collection of header sections defined for the control. The THeaderSection instances in the collection contain the size, layout, content, appearance, and state for each header section. +

    +
    + + + +
    diff --git a/docs/xml/lcl/forms.xml b/docs/xml/lcl/forms.xml index 85741de3d1..7132adf2e7 100644 --- a/docs/xml/lcl/forms.xml +++ b/docs/xml/lcl/forms.xml @@ -1491,6 +1491,26 @@ Operation for the notification + + + Sets the value for the Color property + +

    + SetColor is an overridden method in TCustomFrame used to set the value for the Color property. It calls the inherited method on entry. +

    +

    + When the Color property contains a value other than clDefault, the ParentBackground property is set to False. +

    +
    + + + TControl.Color + +
    + + New value for the property + + Sets the value for the Parent property @@ -1583,14 +1603,20 @@ Indicates if the control uses the background from the parent

    - The write access specifier is overridden in TCustomFrame, and calls the UpdateOpaque method. + The write access specifier is overridden in TCustomFrame. It calls the inherited method on entry. +

    +

    + If the new property value is True and ParentColor is True, the color assigned to the Parent control is stored in the Color property. Otherwise, Color is set to the value clDefault. The UpdateOpaque method is called to adjust the control style flags for the control.

    The default value for the property is True.

    + TWinControl.ParentBackground + TControl.Color + TControl.Parent
    diff --git a/docs/xml/lcl/stdctrls.xml b/docs/xml/lcl/stdctrls.xml index f07c83146d..81a3aeef7e 100644 --- a/docs/xml/lcl/stdctrls.xml +++ b/docs/xml/lcl/stdctrls.xml @@ -826,6 +826,22 @@ Creation parameters updated in the method
    + + Sets the value for the Color property + +

    + Changes the value in ParentBackground to False when Color is set to a value other than clDefault. +

    +
    + + + TWinControl.Color + +
    + + New value for the property + + Sets the value for the ParentBackground proprety @@ -875,7 +891,13 @@ Indicates if the control uses the background from the parent

    - The write access specifier is overridden in TCustomGroupBox, and calls the UpdateOpaque method. + The write access specifier is overridden in TCustomGroupBox. It calls the inherited method on enty. +

    +

    + If AParentBackground is True and ParentColor is True, the Color from the Parent control is assigned to the Color property. Otherwise, the value clDefault is stored in the Color property. +

    +

    + The UpdateOpaque method is called to adjust the control style flags in the control.

    The default value for the property is True.