How know if a stack is maximized ?

Eric Chatonet eric.chatonet at
Tue Oct 9 10:19:41 EDT 2007

Bonjour Damien,

Actually, it's a real problem with stacks the maxWidth or the  
maxHeight of which has been not specified (let to 65536) and Rev  
AFAIK does not provide any function or property to know this.
So just a workaround that consists in setting by yourself the  
maxWidth and the maxHeight according to the windowBoundingRect at  

on preOpenStack
   SetMaxDim the long name of this stack --
end preOpenStack

on SetMaxDim pStack
   set the maxWidth of pStack to item 3 of the windowBoundingRect -  
item 1 of the windowBoundingRect - 20
   set the maxHeight of pStack to item 4 of the windowBoundingRect -  
item 2 of the windowBoundingRect - 36
end SetMaxDim

Values above reduce a bit the values returned when the stack is  
maximized by the system then the below function works:

function IsMaximized pStack
   return (the height of pStack = the maxHeight of pStack) and (the  
width of pStack = the maxWidth of pStack)
end IsMaximized

Tested on Mac OSX, XP SP2 and Vista.
Hope this helps...

Le 9 oct. 07 à 15:08, GIRARD Damien a écrit :

> Hi all,
> I am searching, but I don't find anything now.
> Does there is a function in Runrev that permit to know if a stack  
> is maximized or not ?
> Or do I have to do a trick like ever ?
> (if the rect of the stack look like to be maximized, it is maximized).
> Thanks,
> Damien

Best regards from Paris,
Eric Chatonet.
Plugins and tutorials for Revolution:
Email: eric.chatonet at

More information about the Use-livecode mailing list