Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-01

TButton: Bug or User-Error?

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Thomas Moritz

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

Reply by email

Mattias Gaertner
to Thomas Moritz
Show quoted text 33 lines
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; //----------------------------------------------

Please create a bug report.

Mattias

Reply by email