diff --git a/docs/xml/lcl/comctrls.xml b/docs/xml/lcl/comctrls.xml index 0859bd1356..a63c20a006 100644 --- a/docs/xml/lcl/comctrls.xml +++ b/docs/xml/lcl/comctrls.xml @@ -29360,6 +29360,7 @@ Adds a new tree node as a sibling of the specified node. Text for the new tree node. + Pointer to the data for the new tree node. @@ -35243,7 +35244,7 @@ node hierarchy generated using SaveToFile.

Each tree node in FileName is represented using leading Tab (#9) characters -for the level in the tree node, followed by the Text for the node and an +for the Level in the tree node, followed by the Text for the node and an end-of-line sequence (#13#10). TTreeNode instances are created and added to the Items property when the node values are read from the file.

@@ -35320,13 +35321,41 @@ TStream instance with the tree node data loaded in the method. - Saves the tree nodes in Items to the specified file. - - + +

+SaveToFile is a method used to save the tree nodes in Items to the +specified file name. FileName is a qualified path to the file on the local +file system where the tree node data is stored. If FileName already exists, it +is recreated and previous values in the file are lost. +

+

+SaveToFile visits each of the TTreeNode instances in Items and writes a +textual representation for the tree nodes to the file. Each tree node is +represented by leading Tab (#9) characters to denote the Level for the tree +node, followed by the Text for the node and an end-of-line sequence (#13#10). +

+

+Use LoadFromFile to load and recreate the tree nodes for the control from the +file created in the method. +

+

+Use SaveToStream and LoadFromStream to read or write tree node information +using stream-based storage. +

+
+ + + + + + + + +
@@ -35338,8 +35367,42 @@ File name where the tree node data is stored. Saves the tree nodes in Items to the specified stream. - - + +

+SaveToStream is a method used to store a textual representation for +the tree nodes in Items to the specified Stream. Stream is the TStream +instance where the tree node data is stored. +

+

+SaveToStream visits each of the TTreeNode instances in Items and writes the +tree node information to the stream. Each node is represented Each tree node +is represented by leading Tab (#9) characters to denote the Level for the tree +node, followed by the Text for the node and an end-of-line sequence (#13#10). +

+ +SaveToStream does not change the position in Stream prior to writing +node values. It assumes the stream position has been set in the calling +routine. It does not reset the stream position when the method has been +completed. + +

+Use LoadFromStream to load and create tree nodes in Items from stream-based +storage. +

+

+Use LoadFromFile and SaveToFile to read and write the node hierarchy using +file-based storage. +

+
+ + + + + + + + +
@@ -35352,7 +35415,24 @@ TStream instance where the tree node data is stored. Generates a formatted message with information about the tree view control and optionally tree nodes in Items. - + +

+WriteDebugReport is a method used to generate a formatted message +with information about the tree view control, and optionally the tree nodes in +Items. It is used to create and write debugger messages using the DbgOut and +DebugLn routines. +

+

+The value in Prefix identifies the tree view control and the context for the +message. It is written, along with the ClassName and address for the class +instance, as the first line in the debugger message. +

+

+When AllNodes is set to True, the WriteDebugReport method in Items is +called to include information about the tree nodes in the container in the +debugger message. +

+
@@ -35688,20 +35768,43 @@ calculated. -Last visible tree node starting at the TopItem in the control. + +Contains the last visible tree node starting at the TopItem in the control. + -Color used for the background in the control display area. + +Color used to fill the background on the control display area. +

-The default value for the property is clWindow. Contains the same -value as the BackgroundColor property. +Color is a TColor property with the background color for the tree view +control. The default value for the property is clWindow. Changing +the value for the property causes the control to be redrawn. +

+

+Color contains the same value as the BackgroundColor property. +Color / BackgroundColor is used when the Paint method is called to draw the +control. It provides the background color for both the control and its tree +nodes. +

+

+Use SelectionColor to specify the background color for the selected tree +node(s) on the control. +

+

+Use Font, DisabledFontColor, and HotTrackColor to control the font colors used +for tree node text on the control.

+ + + + TControl.Color
@@ -36000,7 +36103,7 @@ its parent or children.

Items is a TTreeNodes property with the container used to access and maintain the hierarchical list of TTreeNode -instances displayed in the tree view control. +instances displayed on the tree view control.

Items allows indexed access to the TTreeNode instances in the container by @@ -36012,8 +36115,9 @@ AText := ATreeView.Items[0].Text; // caption for the first tree node AText := ATreeView.Items.Item[0].Text; // caption for the first tree node

-Methods in Items can be used to access and maintain the tree nodes and their -hierarchy, including: +The nodes in Items can be added at design-time using the Object Inspector, or +at run-time. Methods in Items can be used to access and maintain the tree +nodes and their hierarchy, including: