Link to home
Start Free TrialLog in
Avatar of jaja2005
jaja2005Flag for Norway

asked on

TVirtualStringTree

I have several object tmyobject where one field is:

FMy: TVirtualStringTree;

I've created another form where i want to show this Virtual Tree and add others node with:


procedure TMyEditor.AddMonitorClick(Sender: TObject);
 var Data: PTreeData;
  XNode: PVirtualNode;
begin
    XNode:=vt.AddChild(nil);
    Data := Vt.GetNodeData(Xnode);
    Data^.TNode := TNode(node);
end;


I open this form with ShowDialog. I want to creare a sort of editor. In TmyEditor
there is already am virtual component which I have dragged from palette. Let's name
it vt. Should I first create FMy in Tmyobject and then link it to the one in MyEditor
so when I add nodes with the procedure above I am changing FMy?

Can you help me? :-(
ASKER CERTIFIED SOLUTION
Avatar of Emmanuel PASQUIER
Emmanuel PASQUIER
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jaja2005

ASKER

What I usually do in your case is putting the component from the object you want to edit in a panel which name, position and size is set to what I want the TV edit component to be , and set the align=alClient. So the component is really displayed in the editor (but not owned by it)

Amazing....
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial