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?

on preopenstack
  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
end preopenstack

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
  else
    pass rawkeydown
  end if
end rawkeydown

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig


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.
> 
> Tim
> 
> 
> 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. :-(
>> 
>> Cheers,
>> 
>> 
>> Malte
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list