X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/427ff66291af2d8dd34ff5ee68c81436997144a1..8bcf4c86f423035eca565571b4cbafd2e60e4c3d:/src/mac/stattext.cpp diff --git a/src/mac/stattext.cpp b/src/mac/stattext.cpp index b2a7d103da..2d81d33b16 100644 --- a/src/mac/stattext.cpp +++ b/src/mac/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(" ,.-;:!?");