Simple question: I have to update a TRectangle fill color into a loop, it only works if I set Application.ProcessMessages, is there any kosher way to do that? I tried BeginScene and other tricks but I was unable so far, maybe I am doing the wrong way. Code should run in FMX for both Windows and Android.
The other option I did was:
ReplyDeleteTThread.Synchronize(nil,
procedure
begin
Rectangle1.Fill.Color := TAlphaColorF.Create(r, g, b, 1).ToAlphaColor;
end);
It works as I should. Is that the best approach?
there's a TColorAnimation component
ReplyDeletePaul TOTH Nice! But in this case I would need to make it by myself :( The problem with Synchronize is because GUI is not thread safe and after close the app it raises an error because the thread is still running. Using Queue, for the other side, is locking the GUI application
ReplyDeleteI solved. Had forgot to check if app was still running (Cancelled)
ReplyDelete