X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d15694e8cad1d44087323bd568ca33ff5b354f2c..f7105c8fe2710892604ad7e4666c978427d62a89:/src/osx/stattext_osx.cpp?ds=inline diff --git a/src/osx/stattext_osx.cpp b/src/osx/stattext_osx.cpp index ad7b76bc7f..a9de6772c1 100644 --- a/src/osx/stattext_osx.cpp +++ b/src/osx/stattext_osx.cpp @@ -1,10 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/osx/carbon/stattext.cpp +// Name: src/osx/stattext_osx.cpp // Purpose: wxStaticText // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id$ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -46,6 +45,14 @@ bool wxStaticText::Create( wxWindow *parent, MacPostControlCreate( pos, size ); SetLabel(label); + if ( HasFlag(wxST_NO_AUTORESIZE) ) + { + // Normally this is done in SetLabel() below but we avoid doing it when + // this style is used, so we need to explicitly do it in the ctor in + // this case or otherwise the control would retain its initial tiny size. + InvalidateBestSize(); + SetInitialSize(size); + } return true; }