X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cfcebdb1bba3369205b6693f2593f74394354edd..baf34314451302852746f3271f5eb4ec94015f64:/src/os2/choice.cpp diff --git a/src/os2/choice.cpp b/src/os2/choice.cpp index f3f95b2a91..5ae8def9d9 100644 --- a/src/os2/choice.cpp +++ b/src/os2/choice.cpp @@ -31,9 +31,7 @@ bool wxChoice::Create( , int n , const wxString asChoices[] , long lStyle -#if wxUSE_VALIDATORS , const wxValidator& rValidator -#endif , const wxString& rsName ) { @@ -44,9 +42,7 @@ bool wxChoice::Create( ,rPos ,rSize ,lStyle -#if wxUSE_VALIDATORS ,rValidator -#endif ,rsName )) return FALSE; @@ -189,6 +185,16 @@ void wxChoice::SetString( ) { SHORT nIndexType = 0; + void* pData; + + if ( m_clientDataItemsType != wxClientData_None ) + { + pData = DoGetItemClientData(n); + } + else // no client data + { + pData = NULL; + } ::WinSendMsg(GetHwnd(), LM_DELETEITEM, (MPARAM)n, 0); @@ -201,6 +207,13 @@ void wxChoice::SetString( ,(MPARAM)nIndexType ,(MPARAM)rsStr.c_str() ); + + if (pData) + { + DoSetItemClientData( n + ,pData + ); + } } // end of wxChoice::SetString wxString wxChoice::GetString(