Autor Beitrag
Christoph Englmann
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Mo 24.01.05 18:14 
Hallo,

hab ne Treeview mit den oberelementen

+München
+Bochum

im Ast München gibt es wiederum die Äste:
-München
+Meier
+Schmidt

und unter Meier gibts wiederm die Äste
-München
-Meier
-Schillerstraße
-Friedenstraße
+Schmidt


Frage:
Bei einem Doppelklick auf den Zweig Schillerstraße soll nun dieser String (Schillerstraße) einer Variablen zugewiesen werden...
Problem:
weiss nicht, wie ich den Wert (Schillerstraße) dieses Zweiges anspreche/auslese...


danke
christoph
herzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 168

WINXP pro, SUSE Linux 9.0
D7 Pers.
BeitragVerfasst: Mo 24.01.05 19:55 
ausblenden Delphi-Quelltext
1:
TreeView1.Selected.Text;					


mfg herzi
Christoph Englmann Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Di 25.01.05 09:02 
okayyyyyyyyy....
das es so einfach ist hätte ich mal wieder nicht gedacht...

eine frage noch:
wie kann ich z.B. noch eine weitere Adresse unter münchen -> müller per code einfügen???

danke
herzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 168

WINXP pro, SUSE Linux 9.0
D7 Pers.
BeitragVerfasst: Di 25.01.05 13:16 
noch einfacher.... *g*
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.Button1Click(Sender: TObject);
var
  node:TTreenode;
begin
  node:=tv.Items.AddChild(tv.Selected,'');
  node.Text:='TEST';
end;