diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-11-09 16:25:44 +0000 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-11-09 16:30:52 +0000 |
commit | 67fc39dcec69bad14ee422c404a21f4854a552f5 (patch) | |
tree | 805ba46395f16c72c0ccd24d529f97c0ecdbaa84 /src/corelib | |
parent | 7647df9e7d2778d05a5af538ec1fd2e2c12b5b3c (diff) | |
download | fpGUI-67fc39dcec69bad14ee422c404a21f4854a552f5.tar.xz |
Moved Menu-key press handling up the class hierarchy to TfpgWidget.
No need for so much code duplication. This also means that widgets like TfpgStringGrid now
have keyMenu keypress behaviour. Basically any widget that supports a PopupMenu.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/fpg_widget.pas | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/fpg_widget.pas b/src/corelib/fpg_widget.pas index 108c9238..67206557 100644 --- a/src/corelib/fpg_widget.pas +++ b/src/corelib/fpg_widget.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Toolkit - Copyright (C) 2006 - 2010 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2012 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -1103,6 +1103,9 @@ procedure TfpgWidget.HandleRMouseDown(x, y: integer; shiftstate: TShiftState); begin if FShowHint then fpgApplication.HideHint; + // keyMenu was pressed + if shiftstate = [ssExtra1] then + HandleRMouseUp(x, y, []); end; procedure TfpgWidget.HandleLMouseUp(x, y: integer; shiftstate: TShiftState); |