Recursive resize events

Emiliano Heyns <[email protected]> Sat, 12 Apr 2003 21:11:26 +0200
Newsgroups gmane.comp.java.xwt.general
Message-ID <[email protected]>
I have the following:

     _SizeChange = function() {
       w = xwt.math.max($lblGroup.width, $lblName.width);
       w = xwt.math.max($lblUsername.width, w);
       w = xwt.math.max($lblPassword.width, w);
       w = xwt.math.max($lblPasswordConfirm.width, w);
       xwt.println('resize to ' + w);
       if (w == 0) { return; }
       w += 10;
       $lblGroup.width = $lblName.width = $lblUsername.width = 
$lblPassword.width = $lblPasswordConfirm.width = w;


If the window starts out with a size larger than the initial size of the 
contained widgets, all goes well. If I set the root frame to be smaller, 
it calls SizeChanged in rapid succession, ending with

Box: Warning, more than 500 SizeChange/PosChange traps triggered since 
last complete render

I don't need to do this in the SizeChange trap, but why is it happening 
under these specific circumstances, and not if the root pane is 
initially bigger?

Emile


_______________________________________________
http://lists.xwt.org/listinfo/dev