Autor Beitrag
SteheAufDerLeitung
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 104



BeitragVerfasst: Mo 09.07.07 13:29 
Nach tagelangem Versuchen geb ich langsam auf! Oder kann es tatsächlich sein, dass man in einer Schleife nicht mehrere Nodes eines TreeViews markieren kann?

Hab mir folgendes gedacht:
ausblenden Delphi-Quelltext
1:
2:
 for i:=0 to TreeView.items.count-1 do
TreeView.items[i].selected := true;


da macht Delphi leider nicht mit, sondern markiert stets nur das letzte item der TreeView! Oder hab ich nen Fehler gemacht? :-D

Multiselect des TreeViews ist natürlich true.

Dank euch schonmal - vielleicht zeigt ihr mir, dass ich doch einfach zu blöd war? ;-D


Moderiert von user profile iconraziel: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Do 12.07.2007 um 18:00
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: Sa 14.07.07 12:03 
1. TTreeView hat keine Eigenschaft MultiSelect
2. Es wäre unlogisch, wenn mehrere Einträge eines TreeViews markiert wären, denk mal einfach an den Explorer
3. Wenn du mehrere Einträge hervorheben möchtest, kannst du auch TTreeNode.ImageIndex oder TTreeNode.StateIndex ändern
4. Meinst du vielleicht TListView? Da wäre MultiSelect möglich.
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Sa 14.07.07 13:21 
Hallo,

zu 1. >> in D3 noch nicht, aber später

zum Problem des Selektierens >> Link

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
Yogu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2598
Erhaltene Danke: 156

Ubuntu 13.04, Win 7
C# (VS 2013)
BeitragVerfasst: So 15.07.07 14:50 
Sorry, ich benutz normalerweiße nur D3, hab in 2005+2006 Turbo nicht nachgeschaut.
SteheAufDerLeitung Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 104



BeitragVerfasst: Di 24.07.07 13:08 
Genau! Für andere Interessierte:

Damit gehts wirklich:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
var  
  X: Integer;  
begin  
  for X := 0 to TreeView1.Items.Count - 1 do  
    TreeView1.Subselect(TreeView1.Items[X]);  
  TreeView1.SetFocus;  
end;



:-D Der Dank ist Euer :-D