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



BeitragVerfasst: Mi 22.08.07 07:37 
Hallo!

Ich habe eine Schleife, in welcher Objekte untersucht werden. Nachdem ein Objekt durchsucht ist, soll das Label angeben "1 von blabla objekten durchsucht".

Dazu hab ich folgendes:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
for i := 0 to objekte.count-1 do begin
  ..;
  durchsuche(objekte);
  ..;
  label1.caption := inttostr(i);
  end;


Das label bleibt aber völlig leer. Die Schleife läuft aber durch. Wie kommt das denn???

Grüße und Dank

Sebastian
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mi 22.08.07 07:44 
Füge noch ein Application.ProcessMessages in die Schleife ein.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
SteheAufDerLeitung Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 104



BeitragVerfasst: Mi 22.08.07 07:49 
Aaaaahhh!! Die Methode unterbricht die Anwendung - in dem Fall die Schleife!? Also läuft die Schleife zu schnell, als dass sich das Label ändern könnte??

Damit klappts jedenfalls.. Danke!
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mi 22.08.07 07:58 
Zitat:
Also läuft die Schleife zu schnell, als dass sich das Label ändern könnte??
Die Caption an sich ändert sich schon, nur wird nicht neu gezeichnet.

_________________
Markus Kinzler.
SteheAufDerLeitung Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 104



BeitragVerfasst: Mi 22.08.07 08:06 
Wenn ich groß bin, will auch so viel wissen ;-D Danke!