TStringGrid: wrong Escape key processing
Original Reporter info from Mantis: Bulba
-
Reporter name: Sergey Bulba
Original Reporter info from Mantis: Bulba
- Reporter name: Sergey Bulba
Description:
If some TStringGrid is focused on a TForm with TButton.Cancel=True, Escape key pressing does not call TButton.OnClick. If to switch to editing of some cell of TStringGrid and then press Escape button, then TButton.OnClick is called instead of aborting cell edition, i.e. totally wrong behavior.
Steps to reproduce:
In new project place StringGrid1 and then Button1 on Form1. Set StringGrid1.Options->goEditing to True and Button1.Cancel:=True, write simple handler:
procedure TForm1.Button1Click(Sender: TObject);
begin
Button1.Caption:=IntToStr(Button1.Tag);
Button1.Tag := Button1.Tag + 1;
end;
Run application, be sure StringGrid1 is focused and press Escape key, Button1Click is not called.
Click some cell of StringGrid1 to go editing cell mode and press Escape key, Button1Click is called now instead of aborting editing.
Mantis conversion info:
- Mantis ID: 25674
- OS: windows
- OS Build: xp,7
- Build: 43696
- Platform: win32
- Version: 1.2.0RC2
- Fixed in version: 1.3 (SVN)
- Fixed in revision: 44376 (#adce7de8)
- Target version: 1.4