Moving a window without a dragbar...

Jeanne A. E. DeVoto jeanne at runrev.com
Tue Dec 4 02:21:01 EST 2001


At 8:40 PM -0800 12/3/2001, Chipp Walters wrote:
>I'm writing a little handler to move a window by clicking on it and
>dragging. I've inserted the following into the stack script:
>
>local startX,startY,dragWd
>
>on mouseDown
>  put true into dragWd
>  put the mouseH into startX
>  put the mouseV into startY
>end mouseDown
[etc]
>This way you can build a project with no window borders or titlebar, and
>have it still be dragged around the screen. How can I get buttons to not
>react to the handlers above without explicitly coding "catch" handlers?

One way is to check the target, and pass the message if the target's not a
card:

on mouseDown
  if word 1 of the target is not "card" then pass mouseDown
  put true into dragWd
  put the mouseH into startX
  put the mouseV into startY
end mouseDown

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!





More information about the use-livecode mailing list