Emiliano Heyns
2003-04-12 19:11:26 UTC
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
_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