X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3260bce473ab247edd8ca1d3aee4eb648b4b97e..9fd9e47a93dfcdd99c2722e288a0f28a51ce6f5f:/src/os2/choice.cpp diff --git a/src/os2/choice.cpp b/src/os2/choice.cpp index 21bdbb4151..a1cdd262b1 100644 --- a/src/os2/choice.cpp +++ b/src/os2/choice.cpp @@ -39,16 +39,16 @@ bool wxChoice::Create( { long lSstyle; - if (!OS2CreateControl( pParent - ,vId - ,rPos - ,rSize - ,lStyle + if (!CreateControl( pParent + ,vId + ,rPos + ,rSize + ,lStyle #if wxUSE_VALIDATORS - ,rValidator + ,rValidator #endif - ,rsName - )) + ,rsName + )) return FALSE; lSstyle = CBS_DROPDOWNLIST | WS_TABSTOP | @@ -188,12 +188,19 @@ void wxChoice::SetString( , const wxString& rsStr ) { - wxFAIL_MSG(wxT("not implemented")); + SHORT nIndexType = 0; -#if 0 // should do this, but no Insert() so far - Delete(n); - Insert(n + 1, s); -#endif + ::WinSendMsg(GetHwnd(), LM_DELETEITEM, (MPARAM)n, 0); + + if (m_windowStyle & wxLB_SORT) + nIndexType = LIT_SORTASCENDING; + else + nIndexType = LIT_END; + ::WinSendMsg( GetHwnd() + ,LM_INSERTITEM + ,(MPARAM)nIndexType + ,(MPARAM)rsStr.c_str() + ); } // end of wxChoice::SetString wxString wxChoice::GetString(