OK. Also need to change TControl.MouseMove:
{------------------------------------------------------------------------------
TControl MouseMove
TControl MouseMove
------------------------------------------------------------------------------}
Procedure TControl.MouseMove(Shift: TShiftState; X, Y: Integer);
var
P: TPoint;
DragObjectDragging : Boolean;
begin
if DragObject <> nil then
DragObjectDragging := true else
DragObjectDragging := false;
if DragObjectDragging then begin
P:=ClientToScreen(Point(X,Y));
DragObject.MouseMove(Shift,P.X,P.Y);
end;
if Assigned(FOnMouseMove) then FOnMouseMove(Self, Shift, X,Y);
end;
Procedure TControl.MouseMove(Shift: TShiftState; X, Y: Integer);
var
P: TPoint;
DragObjectDragging : Boolean;
begin
if DragObject <> nil then
DragObjectDragging := true else
DragObjectDragging := false;
if DragObjectDragging then begin
P:=ClientToScreen(Point(X,Y));
DragObject.MouseMove(Shift,P.X,P.Y);
end;
if Assigned(FOnMouseMove) then FOnMouseMove(Self, Shift, X,Y);
end;
This makes DragOver events fire as well.
Daniel Dugan <[EMAIL PROTECTED]> wrote:
Drat! This successfully ends a drag operation but hoses up Dragover event handling. Still trying.
Daniel Dugan <[EMAIL PROTECTED]> wrote:
Daniel Dugan <[EMAIL PROTECTED]> wrote:!I think I've found a cause for an end drag not working as I reported in issue 1861.TControl.MouseUp tests TControl.Dragging, and it is returning false because the control that generates the mouseup is the target and not the source. This prevents DragObject.MouseUp from firing when the mouse button is released. I'm not sure I'm up to finding the fix, but I will still keep looking as time permits.Also, Controls.pp has 2 SetCaptureControl procedures. Apparently, the on! e with only the Control:TControl parameter is correct.Try this:{------------------------------------------------------------------------------
TControl MouseUp
------------------------------------------------------------------------------}
Procedure TControl.MouseUp(Button: TMouseButton; Shift:TShiftState;
X, Y: Integer);
var
P: TPoint;
DragObjectDragging : Boolean;
begin
if DragObject <> nil then
DragObjectDragging := TControl(DragObject.DragTarget).Dragging;
if (Button in [mbLeft,mbRight]) and DragObjectDragging and (DragObject<>nil) then begin
P:=ClientToScreen(Point(X,Y));
DragObject.MouseUp(Button,Shift,P.X,P.Y);
end;
if Assigned(FOnMouseUp) then FOnMouseUp(Self, Button, Shift, X,Y);
end;
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.
- Re: [lazarus] Bug Report 1861: found cause Daniel Dugan
- Re: [lazarus] Bug Report 1861: found cause Mattias Gaertner
- Re: [lazarus] Bug Report 1861: found cause Daniel Dugan
- Re: [lazarus] Bug Report 1861: found cause Mattias Gaertner
- Re: [lazarus] Bug Report 1861: found cau... Daniel Dugan
Reply via email to