no refreshing FMX Controls

  

I have simple fmx form(Delphi 10.2 Tokyo):

in code I show Button2 for second:

procedure TForm6.FormCreate(Sender: TObject);
begin
Button2.Visible :=false;
end;

procedure TForm6.Button1Click(Sender: TObject);
begin
Button2.Visible := true;
TTask.Create(procedure
begin
Sleep(1000);
TThread.Synchronize(nil, procedure
begin
Button2.Visible := false;
//tries
//Button2.Repaint;
//Layout1.Repaint;
//Self.InvalidateRect(Self.Bounds);
//Application.ProcessMessages;
end);
end).Start;
end;

but after button2 hides, artefact appears. Its gone after manually form resize.

How to force it to refresh?

Comments are closed.