fixing setting initial value under osx_cocoa for single line text controls

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2009-10-01 08:59:01 +00:00
parent b883113df1
commit 63bcc669d8
2 changed files with 11 additions and 6 deletions

View File

@@ -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() ;