diff options
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); |