AutoLayout of tall items?
I want a window to have a fairly large listbox. If I just set this up naively, I find that the AutoLayoutManager gives my list all the available height, and leaves no room for objects created after it.
For instance:
var w = new Window("dialog");
w.text0 = w.add("statictext", undefined, "hamburger");
w.biglist = w.add("listbox", undefined, new Array(200).join("x").split(""));
w.text = w.add("statictext", undefined, "cheeseburger");
w.layout.layout(true);
$.writeln("Window is "+w.size,"\n",
"Text0 is " +w.text0.size,"\n",
"Biglist is " +w.biglist.size,"\n",
"Text is " +w.text.size,"\n"
);
w.show();
Gives these sizes:
Window is 116,1870
Text0 is 70,16
Biglist is 33,1870
Text is undefined
That is, the biglist is assigned the full height of its parent window, which means even without Text, it doesn't fit since some of the space is taken by Text0. And there's no space for Text.
How can I fix this?
I can set the size of biglist to some fraction of the parent window, but that is awkward.
Especially because this is an oversimplified example. In reality, biglist is inside a a panel that is inside a group, so I would need to set those sizes automatically.
Isn't the AutoLayoutManager supposd to solve this for me?
Thanks!