Virtuailstring tree add node to another virtuailstring tree list

drama22
drama22 used Ask the Experts™
on
i have this code to grab node from vst

function form1.lookingTreeView(name: String): PVirtualNode;
var
Node: PVirtualNode;
Data: PUserData;
begin
Result := nil;
Node := VDT1.GetFirst;
while ((Node <> nil) and (Result = nil)) do
begin
Data := VDT1.GetNodeData(Node);
if (Data.FObject.userUid = name) then
begin
Result := Node;
break;
end
else
Node := VDT1.GetNext(Node);
end;
end;

Open in new window


and i use it like so

var
Node: PVirtualNode;
Data: PUserData;
begin
Node := lookingTreeView('123456');
Data := VDT1.GetNodeData(Node);

Open in new window


i want to add this node to another vst list after i find it

lets say my other vst list called VDT2

i want to add the node thet i find from VDT1 To VDT2 and hide it from VDT1

what should i do ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software architect
Top Expert 2012
Commented:
Geert make example to similar question on EE....

Author

Commented:
this is different in his example he copy moves node inside the same VST

i want to copy from VST to another VST which is not found in this example

Author

Commented:
how ever i solve it using other way by creating new class to that other vst and insert data record separately  Thank you sinisa
Sinisa VukSoftware architect
Top Expert 2012

Commented:
... and this is the only way...

* create/add new node in vst2
* get data (record) from vst2 for that node
* ...and assign values to that node from source data (get from vst1)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial