I am trying to create a set of child windows that will pop up in the center of the screen (not simultaneously, of course). Each will contain a table with a single column. The column is a list of items, and the number of items varies from as few as four to as many as twenty or more. The string length of an item varies considerably, too, from as few as five characters to fifty or more.
I want to create a reusable child window to hold a table with the elements of a given list. I want a minimum size for the window (say 200px wide by 150px tall) and a maximum size (say 400px wide and 300px tall). Between these two extremes I want the window to resize based on the number of elements and the width of the largest element in the table.
Even setting aside the max and min sizes, I’ve been completely unable to get the window to resize with the table. I’ve tried every combination of setHeight, setWidth, setSizeFull, setSizeUndefined, and setExpandRatio that I can think of, and in every different order. Unless I set the table height to a specific pixel value, it always seems to fix its height at 15 rows, whether there are actually 5 rows or 50. Similarly, whether I set the table to sizeFull or sizeUndefined, it seems to size itself by the width of the caption. See the attached image for an example.
I’d post code, but what code should I post? I’ve tried it 20 different ways and none worked, so anything I posted would be arbitrary.
Is there anyone who knows if this is possible and, if so, how to make it happen? I’d be happy even without min/max size limits – just a window that sizes according to the contained table would be enough!
Thanks much for any help!