Autor Beitrag
tortom1000
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 175

Win XP, Win Server 2003 - 2012, Win 7
Delphi 7
BeitragVerfasst: Sa 11.03.06 00:35 
Hi Leute,
(unten steht die procedure...)
Ich habe folgendes Problem:
"Löse" ich den Button erstmalig aus, ist alles OK.
Das Directory wird korrekt angezeigt.
"Löse" ich den Button zum zweiten mal aus, sind die einzelnen
Directorys doppelt, dann dreifach usw..
Hab keine Ahnung, woran das liegt.

Hat jemand einen Tipp parat?

Vielen Dank
Tom

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.BitBtn4KeyPress(Sender: TObject; var Key: Char);
begin
 TreeView1.Items.BeginUpdate;
 GetDirs('c:\Filme', TreeView1, nil);
 TreeView1.AlphaSort;
 TreeView1.Items.EndUpdate;
 TreeView1.Visible:=true;
 TreeView1.SetFocus;
end;


Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt
tortom1000 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 175

Win XP, Win Server 2003 - 2012, Win 7
Delphi 7
BeitragVerfasst: Sa 11.03.06 12:41 
Hab's selbst rausgefunden...

TreeView1.Items.clear;
vor dem
TreeView1.Items.BeginUpdate;
ausführen, und alles wird gut...