Alternating Sizes of a Drawer and a Regular Window

Sarah Reichelt sarahr at genesearch.com.au
Sun Jun 5 23:26:48 EDT 2005


Hi Greg,

> For reasons unknown to me, the following handler does not increase  
> the height of the window to 538 when it is about to be displayed as  
> a drawer.
>
>     Greg
>
> drawer theStack
>
> on preOpenStack
>   if the mode of this stack is 13
>   then
>     revChangeWindowSize 261,538
>     set the scrollbarWidth of fld "Hit List" to 12
>   else
>     revChangeWindowSize 720,440
>     set the scrollbarWidth of fld "Hit List" to 16
>     set the loc of this stack to the screenLoc
>   end if
>   revUpdateGeometry
> end preOpenStack
>
I solve this by resizing the drawer in my script before opening it. e.g.

on openAlarmsDrawer
   set the height of stack "Alarms" to the height of stack "Main" - 40
   drawer stack "Alarms"
end openAlarmsDrawer

It's always good to remember that you can refer to & edit stacks that  
are not yet officially open.

HTH,
Sarah



More information about the use-livecode mailing list