View Issue Details

IDProjectCategoryView StatusLast Update
0025674LazarusLCLpublic2014-03-11 02:04
ReporterSergey BulbaAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformwin32OSwindowsOS Versionxp,7
Product Version1.2.0RC2Product Build43696 
Target Version1.4Fixed in Version1.3 (SVN) 
Summary0025674: TStringGrid: wrong Escape key processing
DescriptionIf 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 ReproduceIn 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.
TagsNo tags attached.
Fixed in Revision44376
LazTarget1.4
WidgetsetWin32/Win64
Attached Files

Activities

Sergey Bulba

2014-02-04 12:50

reporter   ~0072848

Just tested in Delphi 7: 1. Button1Click is called when StringGrid1 is focused and Escape is pressed. 2. When editing cell Button1Click is not called when Escape is pressed, but editing is not aborted.

So, aborting editing is not needed, imho, only "1." is real bug of LCL, and "2." can be called "feature of LCL" :)

Sergey Bulba

2014-02-04 13:01

reporter   ~0072849

Last edited: 2014-02-04 13:02

View 2 revisions

And error sound when pressing Escape in editing cell mode is like in http://bugs.freepascal.org/view.php?id=25665 , brrr... Its annoying!

Jesus Reyes

2014-03-08 06:45

developer   ~0073545

I cannot reproduce the sound on escape, pressing escape while the grid is focused now should trigger cancel control execution. Please Test.

Sergey Bulba

2014-03-08 10:40

reporter  

tstr-escape-error.7z (1,977 bytes)

Sergey Bulba

2014-03-08 10:44

reporter   ~0073550

Error sound was in edit mode only, and its still here (see attached tstr-escape-error.7z). Maybe better to create new issue for second bug? Or reopen existing?

Sergey Bulba

2014-03-11 02:04

reporter   ~0073618

Second bug - in new issue: http://bugs.freepascal.org/view.php?id=25847

Issue History

Date Modified Username Field Change
2014-02-04 11:58 Sergey Bulba New Issue
2014-02-04 12:50 Sergey Bulba Note Added: 0072848
2014-02-04 13:01 Sergey Bulba Note Added: 0072849
2014-02-04 13:02 Sergey Bulba Note Edited: 0072849 View Revisions
2014-03-08 06:41 Jesus Reyes Assigned To => Jesus Reyes
2014-03-08 06:41 Jesus Reyes Status new => assigned
2014-03-08 06:45 Jesus Reyes Fixed in Revision => 44376
2014-03-08 06:45 Jesus Reyes LazTarget => 1.4
2014-03-08 06:45 Jesus Reyes Note Added: 0073545
2014-03-08 06:45 Jesus Reyes Status assigned => resolved
2014-03-08 06:45 Jesus Reyes Fixed in Version => 1.3 (SVN)
2014-03-08 06:45 Jesus Reyes Resolution open => fixed
2014-03-08 06:45 Jesus Reyes Target Version => 1.4
2014-03-08 10:40 Sergey Bulba File Added: tstr-escape-error.7z
2014-03-08 10:44 Sergey Bulba Note Added: 0073550
2014-03-11 02:04 Sergey Bulba Note Added: 0073618
2014-03-11 02:04 Sergey Bulba Status resolved => closed