Autor Beitrag
Lena00
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65
Erhaltene Danke: 4



BeitragVerfasst: Di 28.11.17 16:46 
Hallo!
Ich habe einen timer programmiert (siehe Anhang) der auch soweit läuft wie geplant, jedoch sollen nach Ablauf des timers, welcher 20 Sekunden läuft,alle Button deaktiviert werden. Button deaktivieren ist kein Problem aber wie verbindet man beides, heißt wo müssen die Anweisungen eingefügt werden wenn der timer "0"/abgelaufen ist? Habe schon einige Möglichkeiten probiert, aber bisher ohne Erfolg...
Danke im voraus und freundliche Grüße! :)
Einloggen, um Attachments anzusehen!
Symbroson
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 382
Erhaltene Danke: 67

Raspbian, Ubuntu, Win10
C, C++, Python, JavaScript, Lazarus, Delphi7, Casio Basic
BeitragVerfasst: Di 28.11.17 16:54 
Na - wenn der Countdown '0' ist schaltest du deine Controls ab - in derselben Bedingung in der du den Timer ausschaltest.
also
ausblenden Delphi-Quelltext
1:
2:
3:
4:
if fcountdown1 = 0 then begin
    Timer2.Enabled := false;
    {disable buttons}
end;

_________________
most good programmers do programming not because they expect to get paid or get adulation by the public, but because it's fun to program. (Linus Torvalds)
Lena00 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65
Erhaltene Danke: 4



BeitragVerfasst: Di 28.11.17 17:19 
Spitze! Hat funktioniert! Danke :D