Jump to content

Recommended Posts

Posted

How to use .AddNode() procedure in TUniTreeview

 

i tes this on vcl and result is okay,

but in unigui is not

 

 

UNIGUI

 

procedure TfrmMST6_TPS.btnAddKecClick(Sender: TObject);

var

mynode1, mynode2, mynode3, mynode4 : TUniTreeNode;

begin

mynode1 := TUniTreeNode.Create;

mynode2 := TUniTreeNode.Create;

mynode3 := TUniTreeNode.Create;

mynode4 := TUniTreeNode.Create;

 

lbltree.Items.AddNode(mynode1, nil, '1', nil, naAddFirst);

lbltree.Items.AddNode(mynode2, mynode1, '1-2', nil, naAddChild);

lbltree.Items.AddNode(mynode3, mynode1, '1-3', nil, naAddChild);

lbltree.Items.AddNode(mynode4, mynode2, '2-4', nil, naAddChild);

end;

 

 

 

VCL

 

 

procedure TForm1.BitBtn1Click(Sender: TObject);

var

mynode1, mynode2, mynode3, mynode4 : TTreeNode;

begin

mynode1 := TTreeNode.Create(lbltree2.Items);

mynode2 := TTreeNode.Create(lbltree2.Items);

mynode3 := TTreeNode.Create(lbltree2.Items);

mynode4 := TTreeNode.Create(lbltree2.Items);

 

lbltree2.Items.AddNode(mynode1, nil, '1', nil, naAddFirst);

lbltree2.Items.AddNode(mynode2, mynode1, '1-2', nil, naAddChild);

lbltree2.Items.AddNode(mynode3, mynode1, '1-3', nil, naAddChild);

lbltree2.Items.AddNode(mynode4, mynode2, '2-4', nil, naAddChild);

end;

post-644-0-78341900-1345973551.jpg

post-644-0-55449600-1345973561.jpg

  • 4 weeks later...
Posted

How I can Know the Index of Parent when I Click a Child In Unigui Tree

 

 

Thanks

 

 

 

 

How to use .AddNode() procedure in TUniTreeview

 

i tes this on vcl and result is okay,

but in unigui is not

 

 

UNIGUI

 

procedure TfrmMST6_TPS.btnAddKecClick(Sender: TObject);

var

mynode1, mynode2, mynode3, mynode4 : TUniTreeNode;

begin

mynode1 := TUniTreeNode.Create;

mynode2 := TUniTreeNode.Create;

mynode3 := TUniTreeNode.Create;

mynode4 := TUniTreeNode.Create;

 

lbltree.Items.AddNode(mynode1, nil, '1', nil, naAddFirst);

lbltree.Items.AddNode(mynode2, mynode1, '1-2', nil, naAddChild);

lbltree.Items.AddNode(mynode3, mynode1, '1-3', nil, naAddChild);

lbltree.Items.AddNode(mynode4, mynode2, '2-4', nil, naAddChild);

end;

 

 

 

VCL

 

 

procedure TForm1.BitBtn1Click(Sender: TObject);

var

mynode1, mynode2, mynode3, mynode4 : TTreeNode;

begin

mynode1 := TTreeNode.Create(lbltree2.Items);

mynode2 := TTreeNode.Create(lbltree2.Items);

mynode3 := TTreeNode.Create(lbltree2.Items);

mynode4 := TTreeNode.Create(lbltree2.Items);

 

lbltree2.Items.AddNode(mynode1, nil, '1', nil, naAddFirst);

lbltree2.Items.AddNode(mynode2, mynode1, '1-2', nil, naAddChild);

lbltree2.Items.AddNode(mynode3, mynode1, '1-3', nil, naAddChild);

lbltree2.Items.AddNode(mynode4, mynode2, '2-4', nil, naAddChild);

end;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...