[ Pobierz całość w formacie PDF ]
.The value of Index must be unique for each control in the array, of course, but the values do not have to be sequential.Thus, we can add a new node to a TreeView control, inserting it as a child of the currently selected node, and create a new Text Box to go with it as follows:Dim newNode as nodeSet newNode = TV.Nodes.Add(TV.SelectedItem.Index, _tvwChild, , newNodeName, pictureKey)Load MyText(newNode.Index)Theres Lots MoreI wish I had the time and space to tell you more about the TreeView control, but the best I can do is point you in the right direction and let you explore on your own.The TreeView object has a variety of properties that control its appearance, letting you change, for example, the amount of indentation child nodes have with respect to their parent, how lines between nodes are drawn, and the like.You can also specify that all nodes at each level be sorted alphabetically.The Nodes collection has only a few properties and methods.You can add and remove nodes, clear all nodes at once, and determine the number of nodes present.Each individual Node object has a set of properties and methods that provide a great deal of flexibility to the programmer.You can, for example, determine the parent, children, root, and siblings of any node, as well as refer to the next and previous node in the Nodes collection.Using these properties, you can make modifications, such as deleting the current node and all its children, or using the drag-and-drop function to move nodes around in the tree.PreviousTable of ContentsNext | | | | | Use of this site is subject to certain ,All rights reserved.Reproduction whole or in part in any form or medium without express written of EarthWeb is prohibited.Read EarthWeb's privacy statement
[ Pobierz całość w formacie PDF ]