From 40a4529c09a270c5fc53aea0f89a6eb92bac1961 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 14 Sep 2010 23:14:15 +0200 Subject: 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. --- src/gui/fpg_form.pas | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2