Drag a window without a title bar

Mark Schonewille m.schonewille at economy-x-talk.com
Thu Jun 2 15:24:46 CDT 2011


Hi Marty,

The problem with your solution is that there is a lag between the window location and the mouseLoc.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 2 jun 2011, at 21:43, Marty Knapp wrote:

> Hey Bill,
> 
> I use the following - probably gleaned from Scott Rossi. Put it in the stack or card script:
> 
> local allowDrag
> on mouseEnter
>     put "" into allowDrag
> end mouseEnter
> 
> on mouseDown
>   if word 1 of the target = "card" then put mouseLoc() into allowDrag
> end mouseDown
> 
> on mouseMove X,Y
>   if allowDrag = "" then exit mouseMove
>   set topLeft of this stack to globalLoc(X - item 1 of allowDrag & "," & Y - item 2 of allowDrag)
> end mouseMove
> 
> on mouseUp
>     put "" into allowDrag
> end mouseUp
> 
> on mouseRelease
>     put "" into allowDrag
> end mouseRelease
> 
> 
> Marty Knapp




More information about the use-livecode mailing list