(Moderator)
Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.866 Beiträge
Delphi 11 Alexandria
|
Re: Data zu Treeview hinzufügen ?
28. Apr 2008, 17:05
Delphi-Quellcode:
type
PMydata = ^TMyData;
TMyData = Record
Url: string;
end;
...
procedure TForm1.Button1Click(Sender: TObject);
var oNewNode : TTreeNode;
data: PMyData;
begin
oNewNode := treeview1.Items.AddObject( nil, ' Suchmachinen', Nil);
new(data);
data.url := ' http://www.google.de';
treeview1.Items.AddChildObject( oNewNode, ' google', data );
new(data);
data.url := ' http://www.yahoo.de';
treeview1.Items.AddChildObject( oNewNode, ' yahoo', data );
...
Markus Kinzler
|
|
Zitat
|