Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2063

Summary: Incorrect disable Esc key
Product: TeeGrid for Delphi Reporter: sandra pazos <sandra>
Component: GridAssignee: david berneda <david>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=21&t=16968
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description sandra pazos 2018-07-17 10:41:50 EDT
The Key variable should not always be assigned to 0. 
To solve a problem with a specific platform, you should enclose it in the corresponding define. The code below maybe fix the problem: 
procedure TTeeGrid.KeyDown(var Key: Word; var KeyChar: WideChar; Shift: TShiftState);
var tmp : TKeyState;
begin
  inherited;

  tmp.KeyChar:=KeyChar;
  tmp.Key:=Key;

  tmp.Shift:=Shift;
  tmp.Event:=TGridKeyEvent.Down;

  FGrid.Key(tmp);

  {$IFDEF MACOS32}
  Key:=0; // <-- disable "beep" on Mac OSX
  {$ENDIF}
end;