procedure TForm1.New1Click(Sender: TObject);
var
NytItem, NytSubItem : TTreeNode;
begin
if Assigned(treeview1.Selected) then
begin
NytItem := treeview1.selected;
NytSubItem := TreeView1.Items.AddChild(NytItem, 'sub item');
end
else
begin
NytItem := TreeView1.Items.Add(nil, 'New item');
end;
end;
(ikke testet dog)
--
Mvh.
Kasper (TSW)
Webmaster
[Redigeret d. 06/05-04 21:12:48 af Kasper (TSW)]