Hi,
In der Hilfe steht dazu:
Zitat:
Q: How to add a node to the tree?
A: The technique is very similar to the one you used with the standard tree view. The only difference is that you fill the node's data after the insertion of the node
E:
var
Node: PVirtualNode;
Node := VirtualStringTree1.AddChild(nil); // Adds a node to the root of the Tree.
Node := VirtualStringTree1.AddChild(ParentNode); // Adds a node as the last child of the given node.
Node := VirtualStringTree1.InsertNode(Node, amInsertBefore); // Inserts a node as sibling just before the given node.
Alternatively you can use the OnInitChildren event. This event is used when a node is marked as having child nodes and these child nodes are somehow about to be accessed (like iteration, expanding, display etc.).
Scheint egal zu sein was man nutzt, und ich ändere da nichts mehr es war ein harter Kampf bis es so lief.
Da hast du recht, Das Virtual Tree ist doch recht kompliziert aber der Funktionsumfang dieser Komponente macht dies wieder wett.