Maybe I'm missing something,
but it looks like the GetParent doesn't work as expected for a TTMSFMXTreeviewNode.
e.g.
var
parent: TTMSFMXTreeviewNode;
node: TTMSFMXTreeviewNode;
begin
parent := myTreeview.AddNode(nil);
node := myTreeview.AddNode(parent);
// At this point I expect node.GetParent to be the same as "parent"
// but it returns nil !
// I also tried myTreeview.GetParentNode(node) but the result is the same
Pieter
(Pieter)
2
Hi,
We have tested this here nut are not experiencing issues. The following code executes as expected and nparent equals parent
var
parent: TTMSFMXTreeviewNode;
node: TTMSFMXTreeviewNode;
n: TTMSFMXTreeViewNode;
begin
parent := TMSFMXTreeView1.AddNode(nil);
node := TMSFMXTreeView1.AddNode(parent);
nparent := node.GetParent;
Please provide a sample, or complete code snippet that demonstrates this issue.
Strange....
Is this recently fixed ?
Because I just saw, I'm still using 3.4.8.5
Pieter
(Pieter)
4
No,
This has already been available since the first version.
Please note that you can only access the node structure after building the nodes, outside BeginUpdate/EndUpdate if you are using this.
Ok, that's probably the problem.
I'm using BeginUpdate/EndUpdate.
And I'm already calling GetParent whilst filling the treeview.
Thx for the help.