Detecting Window's Maximize Window Click

Rob Cozens rcozens at pon.net
Tue May 30 10:25:56 EDT 2006


Moi:

> 	on resizeStack newWidth,newHeight,oldWidth,oldHeight
> 		if newWidth = oldWidth and newHeight = oldHeight then -- Maximize 
> Box was clicked
>

One further note: Change only the stack dimension(s) in the "if" 
portion and put all the resizing/repositioning of controls in the 
"else" portion...

on resizeStack newWidth,newHeight,oldWidth,oldHeight
	if newWidth = oldWidth and newHeight = oldHeight then -- Maximize Box 
was clicked
		set the height of this stack to [whatever]
	else
		[resize/reposition controls]
	end if

Why?  Because changing the stack dimension(s) generates (a) new 
resizeStack message(s).

Question of the day: shouldn't locking messages in a resizeStack 
handler before changing (a) stack dimension(s) prevent additional 
resizeStack messages?  [It doesn't now.]


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