[Lazarus] TThread.Synchronize

Michael Schnell mschnell at lumino.de
Wed Oct 26 11:17:18 CEST 2016

On 26.10.2016 07:57, LacaK via Lazarus wrote:
> procedure TRefreshFileListThread.Execute;
> begin
>   while not Terminated do begin
>     Synchronize(@MyForm.UpdateFileList); // UpdateFileList is method 
> which clears listbox and then adds files in given shared folder
>     Sleep(10000);
>   end;
This only makes sense if the actual file list generation (all but the 
GUI update) is done in not shown code in the thread before Synchonize is 

Otherwise you just could use TTimer.

Is this done that way?


More information about the Lazarus mailing list