Stacks Losing their Size and Location
Peter M. Brigham
pmbrig at gmail.com
Thu Dec 17 15:47:10 EST 2015
On Dec 16, 2015, at 6:01 PM, Bob Sneidar wrote:
> If I then close the laptop window, come back to work, hook up the external moitor again and open a stack that had been open before when just using the laptop monitor, the location of the new window is partially off screen! That means the title bar is not accessible, and therefore not draggable.
Here's a routine I have in my library that allows scrolling of a window that is partially offscreen, might come in handy for this kind of problem. Option[alt]- scroll to move the stack.
-- Peter
Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig
---------
on scrollStack pStackRef, pDirection
-- allows moving a stack window up, down, left, or right with the scrollwheel
-- or trackpad
-- pDirection can be "up | down | left | right" or the raw keycode
-- for the scrollwheel output
-- use this for stack windows that are larger than your screen size
-- implement with the rawkeydown handler -- q.v.
-- ([shift-]option-scroll scrolls stack)
-- by Peter M. Brigham, pmbrig at gmail.com — freeware
-- requires rawkeydown
-- put this handler and the rawkeydown handler into a stack script
put 10 into speedParam
-- adjust this if you want
put the loc of stack pStackRef into startingLoc
put startingLoc into newLoc
switch pDirection
case "up"
case "65308"
subtract speedParam from item 2 of newLoc
break
case "down"
case "65309"
add speedParam to item 2 of newLoc
break
case "left"
case "65310"
subtract speedParam from item 1 of newLoc
break
case "right"
case "65311"
add speedParam to item 1 of newLoc
break
end switch
move stack pStackRef from startingLoc to newLoc
end scrollStack
on rawkeydown pKey
-- allows moving a stack window up, down, left, or right
-- with scrollwheel or trackpad
-- hold the option[alt]key down and scroll:
-- scrollwheel: option-scroll for up/down, shift-option-scroll for left/right
-- trackpad: option-scroll up/down/left/right
-- use this for stack windows that are larger than your screen size
-- by Peter M. Brigham, pmbrig at gmail.com — freeware
-- requires scrollStack
-- put this handler and the scrollStack handler into a stack script
put the long id of stack (the mousestack) into tStackRef
switch pKey
case 65308 -- up
case 65309 -- down
case 65310 -- left
case 65311 -- right
if the optionkey is up then pass rawkeydown
scrollStack tStackRef, pKey
break
default
pass rawkeydown
-- or add cases to handle other keys
end switch
end rawkeydown
More information about the use-livecode
mailing list