X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9714ffa0c4a0de3f5a2e268b667ca0064f72307a..49a91764b57168d9f441578001b3206a7330ee70:/src/mac/stattext.cpp?ds=sidebyside diff --git a/src/mac/stattext.cpp b/src/mac/stattext.cpp index 783d231f9b..6439400bf3 100644 --- a/src/mac/stattext.cpp +++ b/src/mac/stattext.cpp @@ -28,7 +28,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) #include -BEGIN_EVENT_TABLE(wxStaticText, wxControl) +BEGIN_EVENT_TABLE(wxStaticText, wxStaticTextBase) EVT_PAINT(wxStaticText::OnPaint) END_EVENT_TABLE() @@ -52,7 +52,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id, m_label = label ; bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name ); - SetSizeOrDefault( size ) ; + SetBestSize( size ) ; return ret; } @@ -235,7 +235,7 @@ void wxStaticText::SetLabel(const wxString& st ) SetTitle( st ) ; m_label = st ; if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) ) - SetSizeOrDefault() ; + SetSize( GetBestSize() ) ; Refresh() ; MacUpdateImmediately() ;