Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - tapir

#1
Thanks a million texus. You're right I didn't realize I called getSize() on the panel before it was added to the gui.
Iterating through the widgets sounds like a good solution for what I want.
#2
I want to set the x size of a panel but allow it’s y size to grow as you add widgets to it.
I thought that I could just use getSize() when all the widgets were added and then feed the output back into setSize() with a decreased x component but the size is reported as 0, 0 all the time so I can’t get the y value after the widgets have been added.
However if I use setSize( 0, 0 ) the panel actually get’s set to 0 size so I guess there’s some sort of flag being set after I use setSize(). I’ve looked at the code but can’t figure out how it how it all works.
Is it possible to get the y size after adding widgets somehow? I’m using 0.8.