Topic: Adding Treeview Nodes

Hi all,


How can I add a child node to selected parent using Add button on a form beside right-click pop menu?


Please see the attached sample project.

Post's attachments

Attachment icon Tester6 TreeTopChild.zip 6.88 kb, 18 downloads since 2024-02-16 

Adam
God... please help me become the person my dog thinks I am.

2 (edited by pavlenko.vladimir.v 2024-02-16 14:57:55)

Re: Adding Treeview Nodes

Будет не просто объяснить но я попоробую

It won't be easy to explain but I'll try
https://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=10267&download=0

Post's attachments

Attachment icon 2024-02-16_19-44-08.png 46.53 kb, 6 downloads since 2024-02-16 

Re: Adding Treeview Nodes

..

Post's attachments

Attachment icon Tester6 TreeTopChild.rar 6.36 kb, 22 downloads since 2024-02-16 

4 (edited by AD1408 2024-02-16 19:47:30)

Re: Adding Treeview Nodes

pavlenko.vladimir.v wrote:

..

Thanks a lot but I couldn't get it working.


What I like to do is to add top or child node on the form "frmItemTree" with the help of checkboxes.

Adam
God... please help me become the person my dog thinks I am.

Re: Adding Treeview Nodes

AD1408 wrote:

What I like to do is to add top or child note on the form "frmItemTree" with the help of checkboxes.

не могу понять
I can not understand

Re: Adding Treeview Nodes

Hi Adam


If only a child record and quite simply, then like this

Post's attachments

Attachment icon Tester6 TreeTopChild-m.zip 328.45 kb, 18 downloads since 2024-02-16 

Re: Adding Treeview Nodes

This option is possible for TOP (separate button), child and editing. Everything is as simple as possible.

Post's attachments

Attachment icon Tester6 TreeTopChild-m1.zip 327.92 kb, 20 downloads since 2024-02-16 

8 (edited by AD1408 2024-02-16 20:32:22)

Re: Adding Treeview Nodes

Hi Sparrow,


Thank you very much for your help....


It's shame that we cannot add both top and child records (nodes) on the same form "frmItemTree"


Tried the following for adding Top node on the same form with an another button. It adds top node but not displaying the newly added top node name on the tree.

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
Form1.TreeView1.dbPopupMenu.Items[1].Click;
end;
Adam
God... please help me become the person my dog thinks I am.

9 (edited by sparrow 2024-02-16 21:59:34)

Re: Adding Treeview Nodes

Well why can't we? Can. There is more work in the script....
Don't you want to bypass this? Having created one TOP record, let's say DIRECTORY, and everything else will be child records, STANDS OF POSTCARDS, MAGAZINES, NEWSPAPERS...



If you need it more difficult...
Something like this
Edit the required fields for the entry.

Post's attachments

Attachment icon Tester6 TreeTopChild-m2.zip 329.25 kb, 16 downloads since 2024-02-16 

Re: Adding Treeview Nodes

Option with one field, selection of TOP or child and correct operation of editing TOP and child records.

Post's attachments

Attachment icon Tester6 TreeTopChild-m3.zip 330.1 kb, 24 downloads since 2024-02-17 

Re: Adding Treeview Nodes

Hi Sparrow,


Great stuff.... Truly appreciated.........

Adam
God... please help me become the person my dog thinks I am.