Hi Juan,
Thanks again for this code, it is working well on Win7, but I do want to report a problem on Mac. I know you are busy, treat this as low priority.
My script has multiple sections, some relatively large in height. When opening them on Win7, the height of the dialog increase, sometimes placing the bottom of the dialog off beyond the bottom of the screen. This is OK.
On Mac things are different. The dialog is not increased in height beyond some limit above the bottom of the screen. This results in either squished layout of sections, or overlapping sections. The later happens when I use setFixedHeight on sections in an attempt to work around the former squishing.
When this squishing or overlapping occurs, it is possible to manually "fix" the problem by starting to drag the bottom of the dialog downward. As soon as you start this drag the bottom of the dialog jumps downward resulting in a proper layout.
My guess is the Mac there is some addition logic (not on Win7) that constrains dialog height when adjustToContents() is called.
Attached are screen shots showing the problem. The first looks fine before I open another section. The second shows the result of this opening, with the overlapping sections.
Also, not visible in these screen shots is another minor problem. On Mac the section open/close icons sometimes get stuck in their "depressed" state after the mouse pointer moves off them. This does not seem to happen on Win7.
Thanks,
Mike
Link to screen shots (endor seems to be down now):
https://dl.dropbox.com/u/109232477/sections.zip