lcl: TDockObject: add Dropped property for delphi compatibility (issue #0013427)

git-svn-id: trunk@20067 -
This commit is contained in:
paul 2009-05-20 05:54:07 +00:00
parent dfb54d7324
commit 4a690c2f5a
2 changed files with 5 additions and 0 deletions

View File

@ -340,6 +340,7 @@ type
FDragTarget: TControl;
FDragTargetPos: TPoint;
FAutoCreated: Boolean;
FDropped: Boolean;
protected
procedure EndDrag(Target: TObject; X, Y: Integer); virtual;
function GetDragImages: TDragImageList; virtual;
@ -357,6 +358,7 @@ type
property DragPos: TPoint read FDragPos write FDragPos;
property DragTarget: TControl read FDragTarget write FDragTarget;
property DragTargetPos: TPoint read FDragTargetPos write FDragTargetPos;
property Dropped: Boolean read FDropped;
end;
TDragObjectClass = class of TDragObject;

View File

@ -229,6 +229,7 @@ begin
else
TargetPos := ADragObjectCopy.DragPos; //otherwise take the current position
Accepted := ADropped and SendCmDragMsg(ADragObjectCopy, dmDragLeave);
ADragObjectCopy.FDropped := Accepted;
if ADragObjectCopy.DragTarget <> nil then
begin
@ -496,6 +497,8 @@ begin
else
TargetPos := ADockObjectCopy.DragPos; //otherwise take the current position
Accepted := Accepted and (ADockObjectCopy.Floating or SendCmDragMsg(ADockObjectCopy, dmDragLeave)) and ADropped;
ADockObjectCopy.FDropped := Accepted;
if Accepted and ADockObjectCopy.Floating then
begin
ParentForm := GetParentForm(ADockObjectCopy.Control);