drag a title-less palette stack
Klaus Major
klaus at major-k.de
Sun May 7 11:37:53 EDT 2006
Hi Paul,
> Hi All
>
> I need a script so that a palette stack without a title bar can be
> dragged around with a mouseDown within the stack?.
> I have unsuccessfully tried different ways and searched the
> literature but no luck.
> I feel that somewhere there is an solution, can someone kindly
> point the way?
put this into the card or stack script:
local maydrag
on mouseDown
put mouseH() & "," & mouseV() into maydrag
end mouseDown
on mouseMove
if maydrag is not empty then
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 if
end mouseMove
on mouseUp
put empty into maydrag
end mouseUp
on mouserelease
mouseup
end mouserelease
Hope that helps.
> many thanks
>
> Paul
Regards
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list