Why are you calling w.layout.layout(true)?
Try removing that line.
That's no help.
Window.show() is defined to call the layout function to compute -- that was a vestige of an experiment with calculating the layout, adjusting the size based on the calculated preferredSize, and then re-calculating the layout.
So removing layout() means putting the $.writeln() after the w.show(), and that just gives the same numbers and problems.
1 person found this helpful
There are various problems with the autoloayout manager. A workaround for the problem you describe is the following:
which automatically adjusts the list to the screen/window.
I had tried something like that, but my experiments in that space failed (not sure why, it was late).
My solution was to call .layout.layout(true) and then adjust down the size of the containers of biglist by a constant factor.
As you note in SUFD, I worry about $.screens on multi-monitor machines (as most of ours are). Perhaps not such a big deal for height as width, but it turns out I have width problems too.
I'm not sure if it is better to call .layout.layout(true) and use the size of the window to change the size constraints, and then call .layout.layout(true) a second time; or if it is better to use your method.
There are various problems with the autoloayout manager
I had hoped I was just misunderstanding. Do know if anything's been filed and do you have any bug numbers?
You're right, this is probably better:
w.biglist.maximumSize.height = w.biglist.size-(some constant)
to get around the multi-screen problem. (Somehow my windows always end up on screen 0, probably because Indesign permanently lives there.)