Autor Beitrag
Freischaltcode
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Mi 20.10.04 12:17 
Hi ihr,
bin ja der noob schlechthin, und deshalb hab ich eine frage,
angenommen mein Timer heißt "tmr" (ohne "),
und meine ProgressBar "prg",
jez kann ich ja auf knopfdruck z.B. sagen,
prg.Position:=xy;
...
jez will ich das so ähnlich haben wie bei einem Download,
Der Timer soll eine Zeit rückwärts zählen (also, "Dauert noch X")
und damit soll zugleich auch die Progressbar gespeist werden...
d.h.,
wenn die Zeit X=2min ist,
und eine minute ist rum,
soll die position der Progressbar halt mitte sein (50von100)
...
also ich nehme an das hat keiner verstanden...
es soll quasi wie dieses werden : www.scheissdrauf.de/...ause/kaffeepause.zip
es ist alles fertig, nur ich krich den timer nich eingestellt,
und auch nich richtig mit der Progressbar verbunden...

Hoffe irgendjemand hat verstanden was ich meine und kann mir helfen
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.10.04 12:30 
Bei deiner ProgressBar musst du min, max und step setzen. Step kann auch negativ sein. Dadurch müsste das ganze Rückwärts laufen. Habe ich aber nicht getestet.

Beispiel:
Max setzt du 30
Min auf 0
und Step auf -1

Wenn du dann deinen Timer alle 60000 Millisekunden (Jede Minute) aktiv werden lässt, musst du dort nur noch die Methode StepIt der ProgressBar aufrufen.
Theoretisch sollte das funktionieren.
Freischaltcode Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Mi 20.10.04 12:41 
jasocul hat folgendes geschrieben:
Wenn du dann deinen Timer alle 60000 Millisekunden (Jede Minute) aktiv werden lässt, musst du dort nur noch die Methode StepIt der ProgressBar aufrufen.
Theoretisch sollte das funktionieren.

Was isn die StepIt? (nOObattack)
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.10.04 12:46 
Im Timer-Event schreibst du:
ausblenden Delphi-Quelltext
1:
prg.StepIt;					


Das ist die Methode der ProgressBar, die den voreingestellten Step in der Anzeige durchführt.
Freischaltcode Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Mi 20.10.04 12:54 
procedure TKaffeepauseGo.TimerTimer(Sender: TObject);
begin
proLeiste.StepIt;
proLeiste.Position:=Timer;
end;

???
oda was??
???
(nOOb zum abschuss freigegeben)
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.10.04 13:09 
Nein, nur:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TKaffeepauseGo.TimerTimer(Sender: TObject); 
begin 
proLeiste.StepIt; 
end;
Freischaltcode Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Mi 20.10.04 13:19 
Mh, bei mir macht er nichts,
an der leiste ändert sich nix?!
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 20.10.04 13:28 
Hast du max, min und Step im Objekt-Inspektor gesetzt?
Wird das Timer-Ereignis wirklich ausgelöst? (Setz mal einen Breakpoint rein)

Setz mal Max auf 60, Min auf 0 und Step auf -1.
Das TimerIntervall auf 1000.

Dann sollte das Programm jede Sekunde die ProgressBar aktualisieren.
Freischaltcode Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Mi 20.10.04 13:32 
Es geht,
THANK YOU VERY VIEL *G*