Stack Size Changes
Peter M. Brigham, MD
pmbrig at gmail.com
Wed Aug 10 18:43:30 EDT 2011
FYI, on a mac, the the working screenrect gives you the screenrect minus the height of the mac menubar (22).
Does this work for you?
set the width of this stack to 612
set the height of this stack to 792
set the top of this stack to 110 -- or whatever
When I am setting the stack height > the screenrect, so the bottom of the stack is scrolled below the bottom edge of the screen, I usually put a scrolling handler into the stack or card script:
on rawkeydown what
put the top of stack "myStack" into t
if what = 65308 then -- scroll down
set the top of stack "myStack" to t-12
else if what = 65309 then -- scroll up
set the top of stack "myStack" to t+12
Peter M. Brigham
pmbrig at gmail.com
On Aug 10, 2011, at 5:50 PM, Timothy Miller wrote:
> Hi Malte and Bob,
> The windowBoundingRect is unfamiliar to me. This is probably the gap in my understanding I wanted to fill. I'm reading the dictionary, scratching my head.
> However, the arithmetic is not quite adding up.
> Visually, my stack fits on the screen. If I position it carefully by dragging, with the height set to 742, I can see a little bit of the desktop picture on all four sides. In this case, the rect of the stack is 10,51,1270, 793. I assumed that this would prevent resizing of the stack. It doesn't.
> My windowBounding rect is 0,50,1280,796. Presumably this is the default value. (The top margin seems bigger than it needs to be. The Mac OS menu bar appears to be 40 pixels high, not 50. But that's another matter.)
> If I'm not mistaken, the stack does lie within the windowBounding rect.
> FWIW, the screen rect is 0,0,1280,800
> Setting the top of the stack to 51 before saving and closing, or in preOpenStack does not prevent the automatic chopping off of the stack when it opens. I tried setting the windowBoundingRect to 0,41,1280,796 to give the stack a little more room, but that didn't seem to make any difference.
> Am I not getting something? Or is LC misbehaving just a little?
> This is all academic. I can solve the problem by setting the height or the rect of the stack in preOpenStack.
> Thanks again.
> On Aug 10, 2011, at 1:56 PM, Malte Brill wrote:
>> Hi Tim,
>> If the stack is taller (or wider) than governed by the windowBoundingRect, it will be automatically chopped off. I do not like it... Been that way for ever. :-(
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode