X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3d1a4878f36ba4b5f66c2ccfd2cb27a9dc528b6f..525ae3fe38ea271551cba16b5069ae30fcb07387:/src/mac/carbon/stattext.cpp diff --git a/src/mac/carbon/stattext.cpp b/src/mac/carbon/stattext.cpp index f01e11f666..bbc71894ff 100644 --- a/src/mac/carbon/stattext.cpp +++ b/src/mac/carbon/stattext.cpp @@ -15,6 +15,8 @@ #include "wx/wxprec.h" +#if wxUSE_STATTEXT + #include "wx/app.h" #include "wx/stattext.h" #include "wx/notebook.h" @@ -26,9 +28,7 @@ #include -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) -#endif #include "wx/mac/uma.h" @@ -51,7 +51,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id, Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ; wxMacCFStringHolder str(m_label,m_font.GetEncoding() ) ; - m_peer = new wxMacControl() ; + m_peer = new wxMacControl(this) ; verify_noerr(CreateStaticTextControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, str , NULL , m_peer->GetControlRefAddr() ) ) ; @@ -101,7 +101,8 @@ void wxStaticText::SetLabel(const wxString& st ) SetSize( GetBestSize() ) ; } Refresh() ; - Update() ; + // we shouldn't need forced updates + // Update() ; } bool wxStaticText::SetFont(const wxFont& font) @@ -119,3 +120,6 @@ bool wxStaticText::SetFont(const wxFont& font) return ret; } + +#endif //if wxUSE_STATTEXT +