Drag a window without a title bar

John Dixon dixonja at hotmail.co.uk
Thu Jun 2 15:43:30 EDT 2011


Hi..

Would this help you...

on mouseDown
  -- place the window into the MacOS X dock
  if the optionKey is "down" then
    set the iconic of this stack to true
    exit mouseDown
  end if
  
  -- find the position of the window and the mouse
  put (item 1 of the loc of this stack) - (item 1 of globalLoc(the mouseLoc)) into Hdiff
  put (item 2 of the loc of this stack) - (item 2 of globalLoc(the mouseLoc)) into Vdiff
  
  -- set the position of the window relative to where the mouse has been dragged
  repeat until the mouse is "up"
    set the loc of this stack to (item 1 of globalLoc(the mouseLoc) + Hdiff),(item 2 of globalLoc(the mouseLoc) + Vdiff)
  end repeat
end mouseDown

On 2 Jun 2011, at 20:33, Bill Vlahos wrote:

> I have a stack that uses the windowshape property so it no longer has the title bar. What is the handler I should use to allow the user to drag the stack around? I have a background image that the user could click and drag for moving the window.
> 
> Thanks,
> Bill Vlahos
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 





More information about the use-livecode mailing list