CheckBox.Click(Sender:TObject);
begin
  repeat
    Some Action …

    Appication.ProcessMessage;

  until (CheckBox.State <> checked)
end;

2016-08-10 10:56 GMT-03:00 Schindler Karl-Michael <
[email protected]>:

> Hi.
>
> I want to control the execution of a loop with a checkbox. If the checkbox
> is checked the loop should run, if it is unchecked no action. I tried this
> with onClick:
>
> CheckBox.Click(Sender:TObject);
> begin
>   repeat
>     Some Action …
>     Form.Update;
>   until (CheckBox.State <> checked)
> end;
>
> The loop starts, but i cannot click the Checkbox again for switching off.
> How to do it? Is it possible without threads?
>
> Michael.
> --
> _______________________________________________
> Lazarus mailing list
> [email protected]
> http://lists.lazarus-ide.org/listinfo/lazarus
>



-- 
El que pregunta aprende, y el que contesta aprende a responder.

No a la obsolecencia programada:
http://www.rtve.es/noticias/20110104/productos-consumo-duran-cada-vez-menos/392498.shtml

Linux User #495070
http://domonetic.com/blog
-- 
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to