[Gambas-user] Drag & Drop Question?

Steve Starr comtux at ...626...
Sun Aug 21 19:09:13 CEST 2005


Umm could you provide a simple example for me please.

On 8/21/05, Benoit Minisini <gambas at ...1...> wrote:
> On Sunday 21 August 2005 09:35, Steve Starr wrote:
> > I am trying to move a button like so.
> >
> > <---Code--->
> >
> > PUBLIC SUB Button1_MouseMove()
> >
> > Button1.X = Mouse.X
> > Button1.Y = Mouse.Y
> >
> > END
> >
> > <---The Question--->
> > But the button widget jumps around when i drag it how could i keep the
> > button that i want to drag from jumping around?
> 
> Mouse.X/Y are relative to the top corner of the button!
> 
> You must memorize the absolute coordinates of the mouse in MousePress event,
> and move the button in MouseMov by using the difference between the current
> absolute Mouse cursor position and the memorized one.
> 
> Regards,
> 
> --
> Benoit Minisini
> mailto:gambas at ...1...
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list