- // adjust the label size to the new label
-
- // TODO there should be a way to prevent SetLabel() from doing it (an
- // additional parameter?)
- GtkRequisition req;
- (* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );
-
- SetSize( req.width, req.height );
+ // adjust the label size to the new label unless disabled
+ if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
+ {
+ SetSize( GetBestSize() );
+ }