Adjusting rev window to full-screen

Rob Cozens rcozens at pon.net
Wed Jun 14 11:01:27 EDT 2006


  Francis,

> That's a great idea, Rob, but it doesn't solve my problem
> (unless I can maximize the window from within my display
> script, and know what the rect of that window is, BEFORE
> displaying the .gif file.)
>

I've been playing mostly with the WinXP Maximize/Minimize box; but it 
seems to work pretty much the same on MacOSX.

When the user clicks on the M/M Box, a resizeStack message is sent to 
the stack.  The new height & width seem to be preset to the screenRect, 
windowBoundingRect, or some predetermined max when maximizing.  
Minimizing seems to return the stack to whatever size it was before 
maximization.  FWIW, on a Tablet PC in portrait screen orientation, 
maximizing does NOT fill the screen when the TPC Input Panel is hidden 
{Rev behavior; not MS TPC compliant}.

So if you instruct the user to maximize the stack when she/he wants a 
larger image, you can determine the windowBoundingRect, the screenRect, 
and/or the working screenRect in your resizeStack handler and adjust 
the .gif file height & width before displaying it.

A scrollBar slider should work also; but remember it will generate a 
resizeStack message.  Set the startValue to the minimum height of the 
stack.  Set the endValue to the maximum height available, based on (my 
recommendation) the working screenRect.  Set the thumbPosition to (the  
height of this stack).

on mouseUp
   lock messages
   set the width of this stack to [whatever formula you use to relate 
width to height]
   unlock messages
   set the height of this stack to (the thumbPosition of me) -- will 
trigger resizeStack
end mouseUp

Rob Cozens
CCW, Serendipity Software Company

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)




More information about the use-livecode mailing list