Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
on mouseDown
grab me
end mouseDown
on mouseMove
put item 1 of the location of stack "edge drag" into LR
put item 2 of the location of stack "edge drag" into UD
set the left of stack "edge drag" to (LR - (the left of me))
set the bottom of stack "edge drag" to (UD + (the bottom of me))
end mouseMove
as the graphic ends up being ungrabbable and the stack jinks around the screen for no obvious reason.
local maydrag
on mouseDown
put mouseH() & "," & mouseV() into maydrag
end mouseDown
on mouseMove x,y
if maydrag is empty then
exit mousemove
end if
set the topLeft of this stack to (item 1 of the screenMouseLoc - item 1 of maydrag), (item 2 of the screenMouseLoc - item 2 of maydrag)
end mouseMove
on mouseUp
put empty into maydrag
end mouseUp
on mouserelease
mouseup
end mouserelease