Is there a way to drag a stack window while developing on the MAC OS other than at the bar at the top of the window? If I can't see the top bar and try to drag somewhere in the middle of the stack window, it activates that group, object, etc. The only success I have is using the 'Size and position' on the stack properties window. Thanks in advance...
Asked
Active
Viewed 116 times
2
-
To LiveCode users, it is perfectly clear what is being asked. The question is tagged LiveCode. Stephan Muller, bytebuster, hutchoid, Leeor and Harry clearly have no clue what LiveCode is. If you don't know LiveCode, then stay away from this question and you definitely shouldn't flag it! This question must be re-opened. – Mark Sep 21 '14 at 08:11
1 Answers
0
If you are working in the IDE, you can type command-M to display the message box and type the following code in the message box:
set the loc of this stack to the screenLoc
This will usually move the top of the window to a visible part of the screen. You could also use
set the top of this stack to 100
which will move the title bar down to 100 pixels below the top of the screen.
If you want to move a stack window without title bar, you could use this script:
on grabWindow
if the platform is "MacOS" and (the decorations of the defaultStack contains "title" or the decorations of the defaultStack is "default") then
put 22 into myMenuCorrection
else
put 0 into myMenuCorrection
end if
put "10,10,310,310" into myRect
add myMenuCorrection to item 2 of myRect
lock messages
put (trunc(the width of this window/2) - the mouseH) into difH
put (trunc(the height of this window/2) - the mouseV) into difV
repeat until the mouse is up
put the loc of this window into loc1
put the screenMouseLoc into loc2
add difH to item 1 of loc2
add (difV + myMenuCorrection) to item 2 of loc2
if loc1 is not loc2 then set the loc of this window to loc2
end repeat
unlock messages
end grabWindow
on mouseDown
grabWindow
end mouseDown
I copies this script from a project of mine. Actually, you may not need the entire script and you might think it is a little verbose, but sometimes it could be useful to do a correction for the menubar.

Mark
- 2,380
- 11
- 29
- 49