Autor Beitrag
sonic159
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 76

Windows XP
BDS 2006 Professional
BeitragVerfasst: Mi 23.05.07 16:49 
Hallo...

Gibt es eine möglichkeit das Scrollen während des Expandieren im TreeView zu unterbrechen,
so das immer das Parent-Item zu sehen ist?

Danke!
Son!c
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: Mi 23.05.07 21:51 
Hallo,

meinst Du Expandieren per Code oder durch Benutzeraktion?

Teste mal das im Ereignis OnExpanded, eventuell passt es so:
ausblenden Delphi-Quelltext
1:
2:
if assigned(Node.Parent) then
  TreeView.TopItem := Node.Parent;

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
sonic159 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 76

Windows XP
BDS 2006 Professional
BeitragVerfasst: Fr 25.05.07 15:01 
Expandieren per Code...

Es funktioniert leider nur teilweise!

Während er das Tree-Item Expandiert wird immer wieder das TopItem Selectiert,
wenn er dann aber Fertig ist mit dem Expandieren dann wird das letzte item sichtbar was NICHT
so sein soll, mein Ziel ist es, wenn er ferig mit dem Scrollen ist, das erste Item zu sehen!

Kurz: Er soll NICHT Scrollen

MfG: $on!c
sonic159 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 76

Windows XP
BDS 2006 Professional
BeitragVerfasst: So 27.05.07 12:45 
Kann mir denn keiner dabei helfen,
das Auto-Scroll bei TreeView1.FullExpand zu deaktivieren?

MfG: $on!c
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: Di 29.05.07 17:47 
Hallo,

dann setz doch nach dem Expandieren die Eigenschaft TopItem auf das erste Item des TreeView:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
with TreeView do
  begin
  Items.BeginUpdate;
  FullExpand;
  TopItem := Items[0];
  Items.EndUpdate;
  end;

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )