use-revolution digest, Vol 1 #589 - 14 msgs

Matt Denton matt.denton at limelight.com.au
Tue Aug 6 09:12:01 EDT 2002


Dear Scott,

Many thanks, I feel a bit silly that I didn't think of your nice elegant 
solution.  I guess I thought there must have been a 'drag window' style 
command and blinkered other options.  I've been away from Rev for a few 
months so I'm a tad rusty again (well that's my story!).

Thanks again!

Matt Denton

> does anyone know if you can 'drag' a window around
> from an object other than its titlebar?
>
> Sure -- several ways, all based on the same principle.  The following 
> works
> for me, placed in the object that is clicked to initiate the drag:
>
> on mouseDown
>   set the uAllowDrag of me to the mouseH & "," & the mouseV
> end mouseDown
>
> on mouseMove x,y
>   if the uAllowDrag of me is empty then exit mouseMove
>   put globalLoc(x & "," & y) into tLoc
>   set topLeft of this stack to \
>       item 1 of tLoc - item 1 of the uAllowDrag of me,\
>       item 2 of tLoc - item 2 of the uALlowDrag of me
> end mouseMove
>
> on mouseUp
>   set the uAllowDrag of me to empty
> end mouseUp
>
> on mouseRelease
>   mouseUp
> end mouseRelease




More information about the Use-livecode mailing list