X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a34307e2463bca44f128e28b70e1df4f626e8f8..3c7eea25638c6535d11e248ef8c4621f6ccd791b:/src/osx/textctrl_osx.cpp diff --git a/src/osx/textctrl_osx.cpp b/src/osx/textctrl_osx.cpp index 8fd25ac960..1ff3094dbc 100644 --- a/src/osx/textctrl_osx.cpp +++ b/src/osx/textctrl_osx.cpp @@ -119,7 +119,13 @@ bool wxTextCtrl::Create( wxWindow *parent, m_peer = wxWidgetImpl::CreateTextControl( this, GetParent(), GetId(), str, pos, size, style, GetExtraStyle() ); MacPostControlCreate(pos, size) ; - + +#if wxOSX_USE_COCOA + // under carbon everything can already be set before the MacPostControlCreate embedding takes place + // but under cocoa for single line textfields this only works after everything has been set up + GetTextPeer()->SetStringValue(str); +#endif + // only now the embedding is correct and we can do a positioning update MacSuperChangedPosition() ;