Upgrade to Lion on 15 inch laptop pro forces resize of stacks

Kay C Lan lan.kc.macmail at gmail.com
Sat Jun 16 10:50:53 EDT 2012


William,

This is very easy to achieve, in the card script, on openCard you can
simply,

lock screen
set the height of stack "my stack" to 3456
set the width of stack "my stack" to 2345

This will override the automatic resizing that goes on. This does have it's
problems though as it may push the menubar out of view, making it
impossible to move the stack. This can be rectified by using the rect of
the stack and basing all sizes on the top,left of the rect. Here is an
example

If you created the stack "Untitled 1"  from my last post, you can add this
script to the card:

on openCard
   lock screen
   --you can do this
   --set the height of stack "Untitled 1" to 3000

   --this is what LC squished the stack to
   put the height of stack "Untitled 1" into msg
   put the rect of stack "Untitled 1" into tStartSize
   put item 4 of the screenRect into tScreenHt
  --simulate Dock at bottom with Hide set to On
   subtract 88 from tScreenHt
   if ((item 4 of tStartSize - item 2 of tStartSize) < tScreenHt) then
      put (item 2 of tStartSize  + tScreenHt) into item 4 of tStartSize
      set the rect of stack "Untitled 1" to tStartSize
   end if
   --check that the Stack height has changed
   put cr & the height of stack "Untitled 1" after msg
end openCard

What this will show, if you press the button to make the stack HUGE, then
Save and close the stack, when you reopen it, in the msg box it will show
the Height LC first squished the stack to, and then the new size you forced
it to grow to.

I used 88 because that's what I've discovered is the smallest number when
the Dock is located at the bottom, so this simulates having the Dock at the
bottom, set to Hide, even though the User's setting may be different.

You can easily test for any size you want and then set any width/height
size you feel necessary.

HTH

On Fri, Jun 15, 2012 at 8:17 PM, william humphrey <
bill at bluewatermaritime.com> wrote:

> Thanks for help with confirmation. I was hoping for a way to tell LiveCode
> that the stack size I set was "locked" and not to change it regardless of
> the size of the dock or the size of the screen that the stack is on. If
> that is not possible than I wish that there were "suggested" stack sizes in
> the size & position tab of stack inspector that would tell poor
> unsuspecting programmers to keep their stacks under 736 pixels in height.
>
> Are there similar problems when working in Window's environment?
> _______________________________________________
> 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