summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2010-09-14 23:14:15 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-09-23 16:24:41 +0200
commit40a4529c09a270c5fc53aea0f89a6eb92bac1961 (patch)
treed8ca691e5281115ec596f903f18ce527533d6ce4 /src/gui
parent97a33536ab8650ad3b83d5633997fcc429320105 (diff)
downloadfpGUI-40a4529c09a270c5fc53aea0f89a6eb92bac1961.tar.xz
Adds a property EnableDrops which enables DND for a top-level window.
If set to False (the default), no DND can occur in that window. No OS messages for DND are processed or received.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/fpg_form.pas10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/fpg_form.pas b/src/gui/fpg_form.pas
index 0322050a..f465e09e 100644
--- a/src/gui/fpg_form.pas
+++ b/src/gui/fpg_form.pas
@@ -51,6 +51,8 @@ type
FOnHide: TNotifyEvent;
FOnShow: TNotifyEvent;
FOnHelp: TfpgHelpEvent;
+ FEnableDrops: boolean;
+ procedure SetEnableDrops(const AValue: boolean);
protected
FModalResult: TfpgModalResult;
FParentForm: TfpgBaseForm;
@@ -100,6 +102,7 @@ type
function ShowModal: TfpgModalResult;
procedure Close;
function CloseQuery: boolean; virtual;
+ property EnableDrops: boolean read FEnableDrops write SetEnableDrops;
end;
@@ -185,6 +188,13 @@ end;
{ TfpgBaseForm }
+procedure TfpgBaseForm.SetEnableDrops(const AValue: boolean);
+begin
+ if FEnableDrops = AValue then exit;
+ FEnableDrops := AValue;
+ DoEnableDrops(AValue);
+end;
+
procedure TfpgBaseForm.SetWindowTitle(const ATitle: string);
begin
FWindowTitle := ATitle;