Ignore:
Timestamp:
Jun 10, 2020, 9:47:11 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Allow to close windows by Escape key.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/DrawDlg.pas

    r229 r257  
    2929    procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
    3030    procedure MouseLeave; override;
     31    procedure KeyDown(var Key: Word; Shift: TShiftState); override;
    3132  public
    3233    constructor Create(AOwner: TComponent); override;
     
    171172end;
    172173
     174procedure TDrawDlg.KeyDown(var Key: Word; Shift: TShiftState);
     175begin
     176  if Key = VK_ESCAPE then Close;
     177  inherited KeyDown(Key, Shift);
     178end;
     179
    173180procedure TDrawDlg.VisibleChangedHandler(Sender: TObject);
    174181begin
Note: See TracChangeset for help on using the changeset viewer.