X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80fdcdb90ef779185492dab676d461fc34933312..cc4d5638c66a409e421420ed7110917755a66788:/src/osx/stattext_osx.cpp diff --git a/src/osx/stattext_osx.cpp b/src/osx/stattext_osx.cpp index 9c163f8b59..a9de6772c1 100644 --- a/src/osx/stattext_osx.cpp +++ b/src/osx/stattext_osx.cpp @@ -4,7 +4,6 @@ // 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; }