[wxPython] Re: wxStaticText resize problem

In my application I have to update the some labels.
The problem is that after I resize the window all
static text labels are truncated (to the size had at
creation time).
What can be the problem ?

The wxStaticText will normally resize themselves when
SetLabel is
called,
but since you've got it in a sizer that reduces it
back to the minimal
size.
That's because sizer's assume that the minimal size of
a widget is its
initial size. You can get around that by calling

    sizer.SetItemMinSize(stattext.GetBestSize())

after changing the label.

···

--
Robin Dunn
Software Craftsman

I've used the function and it work very well, thanks.

But if the label is on a panel that is on another
sizer the function works only for the panel sizer. And
then you have to do the same operation for the panel
and it's sizer too, etc. Now that I know what to do
it's not a problem anymore.

Thanks,
   Lucian

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax