X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/427ff66291af2d8dd34ff5ee68c81436997144a1..33f39af3b0531870e1d9e74b8f1b972badf16f8b:/src/mac/carbon/stattext.cpp?ds=inline diff --git a/src/mac/carbon/stattext.cpp b/src/mac/carbon/stattext.cpp index b2a7d103da..2d81d33b16 100644 --- a/src/mac/carbon/stattext.cpp +++ b/src/mac/carbon/stattext.cpp @@ -41,22 +41,17 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id, long style, const wxString& name) { - SetName(name); - m_backgroundColour = parent->GetBackgroundColour() ; - m_foregroundColour = parent->GetForegroundColour() ; - - if ( id == -1 ) - m_windowId = (int)NewControlId(); - else - m_windowId = id; - - m_windowStyle = style; m_label = wxStripMenuCodes(label) ; - bool ret = wxControl::Create( parent, id, pos, size, style , wxDefaultValidator , name ); + if ( !wxControl::Create( parent, id, pos, size, style, + wxDefaultValidator , name ) ) + { + return false; + } + SetBestSize( size ) ; - return ret; + return true; } const wxString punct = wxT(" ,.-;:!?");