diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-10-09 13:03:19 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-10-09 13:03:19 +0200 |
commit | 6d5ebc3a2bea3629676fab2996852f38bcc59118 (patch) | |
tree | d74ef7efe966193d30a51da1a5833bdc5315371e /src/corelib | |
parent | a7283b51e7737561e32c64b520a0c6380b1dc3e6 (diff) | |
download | fpGUI-6d5ebc3a2bea3629676fab2996852f38bcc59118.tar.xz |
New OnShow event for PopupMenu window.
Signed-off-by: Graeme Geldenhuys <graeme@mastermaths.co.za>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/fpg_popupwindow.pas | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/corelib/fpg_popupwindow.pas b/src/corelib/fpg_popupwindow.pas index ee891f68..fe7ef9d6 100644 --- a/src/corelib/fpg_popupwindow.pas +++ b/src/corelib/fpg_popupwindow.pas @@ -38,15 +38,18 @@ type private FDontCloseWidget: TfpgWidget; FOnClose: TNotifyEvent; + FOnShow: TNotifyEvent; FPopupFrame: boolean; procedure SetPopupFrame(const AValue: boolean); protected procedure MsgClose(var msg: TfpgMessageRec); message FPGM_CLOSE; procedure AdjustWindowStyle; override; procedure HandleClose; virtual; + procedure HandleShow; override; procedure ProcessPopupFrame; virtual; procedure DoPaintPopupFrame; virtual; procedure DoOnClose; virtual; + procedure DoOnShow; virtual; public constructor Create(AOwner: TComponent); override; procedure ShowAt(AWidget: TfpgWidget; x, y: TfpgCoord); overload; @@ -55,6 +58,7 @@ type property DontCloseWidget: TfpgWidget read FDontCloseWidget write FDontCloseWidget; property PopupFrame: boolean read FPopupFrame write SetPopupFrame; property OnClose: TNotifyEvent read FOnClose write FOnClose; + property OnShow: TNotifyEvent read FOnShow write FOnShow; end; @@ -231,6 +235,12 @@ begin HandleHide; end; +procedure TfpgPopupWindow.HandleShow; +begin + inherited HandleShow; + DoOnShow; +end; + procedure TfpgPopupWindow.ProcessPopupFrame; var i: integer; @@ -277,6 +287,12 @@ begin OnClose(self); end; +procedure TfpgPopupWindow.DoOnShow; +begin + if Assigned(FOnShow) then + FOnShow(self); +end; + constructor TfpgPopupWindow.Create(AOwner: TComponent); begin inherited Create(AOwner); |