Ignore:
Timestamp:
Aug 8, 2016, 12:37:58 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: ESC and ENTER keys handling in some dialogs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormAcronym.pas

    r33 r85  
    3434    procedure ACategoryAddExecute(Sender: TObject);
    3535    procedure ACategoryRemoveExecute(Sender: TObject);
     36    procedure EditMeaningKeyPress(Sender: TObject; var Key: char);
    3637    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    37     procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
    3838    procedure FormShow(Sender: TObject);
    3939    procedure ListBox1SelectionChange(Sender: TObject; User: boolean);
     
    5656
    5757{ TFormAcronym }
    58 
    59 procedure TFormAcronym.FormKeyUp(Sender: TObject; var Key: Word;
    60   Shift: TShiftState);
    61 begin
    62   if Key = 13 then ButtonOk.Click;
    63   if Key = 27 then ButtonCancel.Click;
    64 end;
    6558
    6659procedure TFormAcronym.FormClose(Sender: TObject; var CloseAction: TCloseAction
     
    9487    UpdateInterface;
    9588  end;
     89end;
     90
     91procedure TFormAcronym.EditMeaningKeyPress(Sender: TObject; var Key: char);
     92begin
     93  if Ord(Key) = 13 then ButtonOk.Click;
     94  if Ord(Key) = 27 then ButtonCancel.Click;
    9695end;
    9796
Note: See TracChangeset for help on using the changeset viewer.