[Lazarus] TButton: Bug or User-Error?

Thomas Moritz thm_ml at thmoritz.de
Fri Jan 2 18:59:55 CET 2009


Hello and Happy New Year,

my system (linux): x86_64, fpc 2.2.3, lazarus 0.9.27 SVN 18055

Button1.Enabled:=False; //works fine :-)
Button1.Enabled:=True;  //bug or user-error?

Sample:
Set the mouse over Button1 and press left mouse-key -> fine :-)
Do not move the mouse!
If counter 50 and 'Button1.Enabled' press left mouse.key!
...no effect
First you must move the mouse beside.

Button1 is default:
Press Return-Key
If counter 50 and 'Button1.Enabled' press 'Return-Key'
...no effect  

//---------------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
var n: integer;
begin
  Button1.Enabled:=False;
  for n:=0 to 50 do
  begin
    sysutils.sleep(10);
    Label1.Caption:=inttostr(n);
    Application.ProcessMessages;
  end;
  Button1.Enabled:=True;
end;
//----------------------------------------------

regards Th. Moritz



More information about the Lazarus mailing list