Click here to Skip to main content
15,868,145 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The following occurs in a FireMonkey (Delphi XE3) application. Look at the following code (it’s just a dummy example, to illustrate the issue):
procedure TForm1.Button4Click(Sender: TObject);
var
    i: Integer;
begin
    Button4.Enabled:= false; //This should gray-out the button

    // get busy for some time
    for I := 0 to 100000000000 do
    begin

    end;

    Button4.Enabled:= true;
end;


I would expected Button4 to get grayed-out before entering into the busy operation represented by the “for” loop. Nonetheless, it doesn’t.

By the end of the OnClick handler execution, the button does not “seem to react” to the Button4.Enabled:= false. Why?

How can I workaround it?

This works just fine in VCL.

Thanks.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900