IRWANTO82 Posted August 26, 2012 Posted August 26, 2012 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; Quote
IRWANTO82 Posted August 26, 2012 Author Posted August 26, 2012 Tree.Items.AddChild my question is "How to use .AddNode() procedure" not AddChild ???? is AddChild can used datapointer???? Quote
zilav Posted August 26, 2012 Posted August 26, 2012 Are you joking? AddChild retuns TUniTreeNode, you can do what you want with it including data pointers. Quote
Administrators Farshad Mohajeri Posted August 26, 2012 Administrators Posted August 26, 2012 my question is "How to use .AddNode() procedure" not AddChild ???? is AddChild can used datapointer???? I'll check the issue. Quote
rencarnacion Posted September 20, 2012 Posted September 20, 2012 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; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.