move textbox script

Mark Wieder mwieder at ahsoftware.net
Sun Jul 11 12:42:34 EDT 2004


Bob-

I'm sure someone will chime in with a better way, but here's what I
do to drag buttons around:

local bIsDragging
local mouseDownObject

on mouseDown
  if the name of the target contains "button" then
    put true into bIsDragging
    put the target into mouseDownObject
  end if
  pass mouseDown
end mouseDown

on mouseRelease
  put false into bIsDragging
end mouseRelease

on mouseUp
  put false into bIsDragging
end mouseUp

on mouseMove x,y
  if bIsDragging = true then
    set the loc of mouseDownObject to x,y
  end if
end mouseMove

-- 
-Mark Wieder
 mwieder at ahsoftware.net



More information about the use-livecode mailing list