mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 09:49:22 +02:00
lcl: pass Control instead of TDragControlObject into OnDragXXX events if TDragControlObject has been created automatically (for delphi compatibility) (issue #0001850)
git-svn-id: trunk@14855 -
This commit is contained in:
parent
f098565cff
commit
9bdd9bd85f
@ -338,6 +338,7 @@ type
|
|||||||
FControl: TControl;
|
FControl: TControl;
|
||||||
FDragTarget: TControl;
|
FDragTarget: TControl;
|
||||||
FDragTargetPos: TPoint;
|
FDragTargetPos: TPoint;
|
||||||
|
FAutoCreated: Boolean;
|
||||||
protected
|
protected
|
||||||
procedure EndDrag(Target: TObject; X, Y: Integer); virtual;
|
procedure EndDrag(Target: TObject; X, Y: Integer); virtual;
|
||||||
function GetDragImages: TDragImageList; virtual;
|
function GetDragImages: TDragImageList; virtual;
|
||||||
@ -349,6 +350,7 @@ type
|
|||||||
procedure ShowDragImage; virtual;
|
procedure ShowDragImage; virtual;
|
||||||
|
|
||||||
property AlwaysShowDragImages: Boolean read FAlwaysShowDragImages write FAlwaysShowDragImages;
|
property AlwaysShowDragImages: Boolean read FAlwaysShowDragImages write FAlwaysShowDragImages;
|
||||||
|
property AutoCreated: Boolean read FAutoCreated;
|
||||||
property Control: TControl read FControl write FControl;
|
property Control: TControl read FControl write FControl;
|
||||||
property DragPos: TPoint read FDragPos write FDragPos;
|
property DragPos: TPoint read FDragPos write FDragPos;
|
||||||
property DragTarget: TControl read FDragTarget write FDragTarget;
|
property DragTarget: TControl read FDragTarget write FDragTarget;
|
||||||
|
@ -144,6 +144,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
FDragObjectAutoFree := true;
|
FDragObjectAutoFree := true;
|
||||||
FDragObject := TDragControlObject.Create(AControl);
|
FDragObject := TDragControlObject.Create(AControl);
|
||||||
|
FDragObject.FAutoCreated := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
GetCursorPos(p);
|
GetCursorPos(p);
|
||||||
|
Loading…
Reference in New Issue
Block a user