SetTitle( st ) ;
m_label = st ;
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
+ {
+ // temporary fix until layout measurement and drawing are in synch again
+ Refresh() ;
SetSize( GetBestSize() ) ;
-
+ }
Refresh() ;
Update() ;
}
{
bool ret = wxControl::SetFont(font);
- // adjust the size of the window to fit to the label unless autoresizing is
- // disabled
- if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
- SetSize( GetBestSize() );
+ 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() ;
+ SetSize( GetBestSize() );
+ }
+ }
return ret;
}
SetTitle( st ) ;
m_label = st ;
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
+ {
+ // temporary fix until layout measurement and drawing are in synch again
+ Refresh() ;
SetSize( GetBestSize() ) ;
-
+ }
Refresh() ;
Update() ;
}
{
bool ret = wxControl::SetFont(font);
- // adjust the size of the window to fit to the label unless autoresizing is
- // disabled
- if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
- SetSize( GetBestSize() );
+ 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() ;
+ SetSize( GetBestSize() );
+ }
+ }
return ret;
}