-void wxStaticText::SetLabel(const wxString& label)
-{
- wxStaticTextBase::SetLabel(label);
-
- // adjust the size of the window to fit to the label unless autoresizing is
- // disabled
- if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
- {
- DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT);
- SetSizeHints(GetSize());
- }
-}
-
-
-bool wxStaticText::SetFont(const wxFont& font)
-{
- 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) )
- {
- DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT);
- SetSizeHints(GetSize());
- }
-
- return ret;
-}