+bool wxStaticText::SetFont(const wxFont& font)
+{
+ bool ret = wxControl::SetFont(font);
+
+ if ( ret )
+ {
+ // adjust the size of the window to fit to the label unless autoresizing is
+ // disabled
+ if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
+ {
+ // temporary fix until layout measurement and drawing are in synch again
+ Refresh() ;
+ InvalidateBestSize();
+ SetSize( GetBestSize() );
+ }
+ }
+
+ return ret;
+}