diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-03-18 14:12:20 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-03-18 14:12:20 +0000 |
commit | ced6032ce5b612ed878feb5acff423a462a4c997 (patch) | |
tree | 31d1b7a70d3320ccd0465782e27d8aa5e9674189 | |
parent | 22a29ca5af542417cf2dc7279d05846c0c5be57b (diff) | |
download | fpGUI-ced6032ce5b612ed878feb5acff423a462a4c997.tar.xz |
* When a form is Moved, Resized or Deactivates all popup windows are closed.
-rw-r--r-- | src/gui/gui_form.pas | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/gui_form.pas b/src/gui/gui_form.pas index 71d72b51..07ab9177 100644 --- a/src/gui/gui_form.pas +++ b/src/gui/gui_form.pas @@ -58,6 +58,8 @@ type procedure HandleClose; virtual; procedure HandleHide; override; procedure HandleShow; override; + procedure HandleMove(x, y: TfpgCoord); override; + procedure HandleResize(awidth, aheight: TfpgCoord); override; procedure HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); override; procedure AfterConstruction; override; procedure BeforeDestruction; override; @@ -95,6 +97,7 @@ implementation uses fpgfx, + gfx_popupwindow, gui_menu; type @@ -151,6 +154,7 @@ end; procedure TfpgForm.MsgDeActivate(var msg: TfpgMessageRec); begin + ClosePopups; if ActiveWidget <> nil then ActiveWidget.KillFocus; if Assigned(FOnDeactivate) then @@ -269,6 +273,18 @@ begin FOnShow(self); end; +procedure TfpgForm.HandleMove(x, y: TfpgCoord); +begin + ClosePopups; + inherited HandleMove(x, y); +end; + +procedure TfpgForm.HandleResize(awidth, aheight: TfpgCoord); +begin + ClosePopups; + inherited HandleResize(awidth, aheight); +end; + procedure TfpgForm.HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); var |