Autor Beitrag
Phanuel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 36

Win XP Pro, Mandrake linux 10.0

BeitragVerfasst: Sa 15.05.04 18:12 
Ich will eine Editkomponente von 1 auf 100 hochzählen lassen.
Also das er alle Zahlen durchrennt bis er auf 100, is.
Halt ne Prozentanzeige...
Ich hab jetzt nur das Problem, das wenn ich zb schreibe.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
x:=1
while x < 100 do
begin
  x:=x+1
  edit1.text:=inttostr(x)+'%'
end;


das er mir dann nur am ende 100 ausgibt aber nicht die 1, die 2, .... , die 98, die 99.
Kann soetwas die editkomponente überhaupt?

Habs auch schon mit nem label ausprobiert...

Danke schonma im Voraus...

Moderiert von user profile iconMotzi: Delphi-Tags hinzugefügt.
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Sa 15.05.04 18:22 
Hallo

Suche in: Delphi-Forum, Delphi-Library APPLICATION.PROCESSMESSAGES

bau ein application.ProcessMessages; innerhalb der Schleife ein, damit die Anwendung auf die Änderung reagieren kann. normalerweise ruft man das aber nicht bei jedem Durchlauf auf, kostet zuviel zeit, aller 10 Durchläufe reicht meist auch (z.B. mit if x mod 10 = 0 then applic.....

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)