On Wed, 22 Mar 2006 09:13:53 -0800 (PST) Daniel Dugan <[EMAIL PROTECTED]> wrote:
> OK. Also need to change 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; > > 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. > > --------------------------------- > Yahoo! Mail > Bring photos to life! New PhotoMail makes sharing a breeze. > ! 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; Can you create a diff, so we can see the differences? Mattias _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives