Autor Beitrag
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Do 14.10.04 15:46 
Hi
kann ich den Imageindex schon beim erstellen eines Knotens (add) zuweisen?
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Do 14.10.04 16:38 
Hallo,

klar, kannst Du:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
var aNode:TTreeNode;
  
  ...
  aNode:=TreeView1.Add(nil, 'Ein Knoten');
  aNode.ImageIndex:=0;
  aNode.SelectedIndex:=1;
  ...


oder

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
  ...
  with TreeView1.Add(nil, 'Ein Knoten') do
  begin
    ImageIndex:=0;
    SelectedIndex:=1;
  end; // with
  ...

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
Coder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Fr 15.10.04 18:08 
thx, hat funktioniert. :)