I have and it doesn't make sense to me the demo only adds the tree information with static declared
tree nodes. What i am not understanding is how to programatically find a node and adding a new child to the parent node . pleas look at my input a small sample project to add this programatically would help.
I have written code using the standard delphi VCL which works fine . But it seems the same logic does not apply to your treeview and obviously i need to use your component.
procedure TformAdvTreeView.IWAppFormCreate(Sender: TObject);
var
N, NC, NCC: TAdvTreeNode;
begin
FrameTopFrame1.Align := alTop;
FrameLeftFrame1.Align := alLeft;
TIWAdvTreeView1.Items.Clear;
N := TIWAdvTreeView1.Items.Add('Folder 1');
N.Hint := 'Folder 1';
N.ImageURL := '/files/f/g/h/j/folder.gif';
N.ImageCollapsedURL := '/files/f/g/h/j/folder-closed.gif';
N.Tag := 1;
N.IsExpanded := False;
NC := N.AddChild('/files/b/h/f/d/File A');
NC.Hint := 'File A';
NC.ImageURL := '/files/b/h/f/d/file.png';
NC.Tag := 2;
NC := N.AddChild('/files/b/h/f/d/File B');
NC.Hint := 'File B';
NC.ImageURL := '/files/file.png';
NC.Tag := 3;
N := TIWAdvTreeView1.Items.Add('Folder 2');
N.Hint := 'Folder 2';
N.ImageURL := '/files/folder.gif';
N.ImageCollapsedURL := '/files/folder-closed.gif';
N.Tag := 4;
N.IsExpanded := True;
NC := N.AddChild('Subfolder 1');
NC.Hint := 'Subfolder 1';
NC.ImageURL := '/files/folder.gif';
NC.ImageCollapsedURL := '/files/folder-closed.gif';
NC.Tag := 5;
NCC := NC.AddChild('File C');
NCC.Hint := 'File C';
NCC.ImageURL := '/files/file.png';
NCC.Tag := 6;
N := TIWAdvTreeView1.Items.Add('Options');
N.Hint := 'Options';
N.ImageURL := '/files/options.png';
N.Tag := 7;
N.IsExpanded := True;
NC := N.AddChild('Operating System');
NC.Hint := 'Select your current operating system.';
NC.ImageURL := '/files/pc.gif';
NC.Tag := 8;
NCC := NC.AddChild('Windows XP');
NCC.Hint := 'Windows XP';
NCC.ImageURL := '/files/windows.png';
NCC.Tag := 9;
NCC.NodeType := ntRadioButton;
NCC := NC.AddChild('Windows Vista');
NCC.Hint := 'Windows Vista';
NCC.ImageURL := '/files/windowsvista.png';
NCC.Tag := 10;
NCC.NodeType := ntRadioButton;
NCC := NC.AddChild('Windows 7');
NCC.Hint := 'Windows 7';
NCC.ImageURL := '/files/windows7.png';
NCC.Tag := 11;
NCC.Checked := True;
NCC.NodeType := ntRadioButton;
NC := N.AddChild('Browsers');
NC.Hint := 'Select the currently installed browsers.';
NC.ImageURL := '/files/world.png';
NC.Tag := 12;
NCC := NC.AddChild('Chrome');
NCC.Hint := 'Google Chrome';
NCC.ImageURL := '/files/chrome.png';
NCC.Tag := 13;
NCC.Checked := True;
NCC.NodeType := ntCheckBox;
NCC := NC.AddChild('FireFox');
NCC.Hint := 'Mozilla FireFox';
NCC.ImageURL := '/files/firefox.png';
NCC.Tag := 14;
NCC.NodeType := ntCheckBox;
NCC := NC.AddChild('Internet Explorer');
NCC.Hint := 'Microsoft Internet Explorer';
NCC.ImageURL := '/files/ie.png';
NCC.Tag := 15;
NCC.Checked := True;
NCC.NodeType := ntCheckBox;
NCC := NC.AddChild('Opera');
NCC.Hint := 'Opera';
NCC.ImageURL := '/files/opera.png';
NCC.Tag := 16;
NCC.NodeType := ntCheckBox;
NCC := NC.AddChild('Safari');
NCC.Hint := 'Apple Safari';
NCC.ImageURL := '/files/safari.png';
NCC.Tag := 17;
NCC.NodeType := ntCheckBox;
N := TIWAdvTreeView1.Items.Add('TMS Software');
N.Hint := 'Link to the TMS Software site';
N.ImageUrl := '/files/tms.png';
N.Tag := 18;
end;