From 67fc39dcec69bad14ee422c404a21f4854a552f5 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Fri, 9 Nov 2012 16:25:44 +0000 Subject: 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. --- src/corelib/fpg_widget.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/corelib') 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); -- cgit v1.2.3-70-g09d2