StringGrid OnEdit kills ButtonClick handler on same form
Original Reporter info from Mantis: milleratotago
-
Reporter name: Jeff Miller
Original Reporter info from Mantis: milleratotago
- Reporter name: Jeff Miller
Description:
I am a newbie, and I apologize in advance if I am doing something really dumb. The apparent bug is simple to describe:
I created a new application and put one StringGrid and one Button on the form.
I set the StringGrid's OnEditingDone event handler and the button's OnClick handler to display ShowMessage's as shown in the source code listing below. When I run the program, clicking the button only shows the message 'OnEditingDone'. The message 'button click' is NEVER SHOWN. Here is the complete code of Unit1.pas:
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
Grids, Buttons, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
StringGrid1: TStringGrid;
procedure Button1Click(Sender: TObject);
procedure StringGrid1EditingDone(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage('OK button click');
end;
procedure TForm1.StringGrid1EditingDone(Sender: TObject);
begin
ShowMessage('OnEditingDone');
end;
initialization
{$I unit1.lrs}
end.
Additional information:
Clicking the button produces the same result (the message 'OnEditingDone') whether the StringGrid's goEditing property is set to true or false.
It also produces the same result whether the program is run within the IDE or by starting the compiled EXE file.
The operating system is Windows 7 32 bit.
The About Lazarus item in the IDE produces the following
identifying information:
Version #: 0.9.28.2 beta.
Date: 2009-10-25
FPC version: 2.2.4
SVN Revision: 22279
i386-win32-win32/win64
Thank you for your time,
Mantis conversion info:
- Mantis ID: 18686
- Version: 0.9.28.2