]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/choice.cpp
Better sorting example and better default
[wxWidgets.git] / src / os2 / choice.cpp
index 770da88cccc274c1e4c1cba5edc3043f166adca9..59e63f9275e91bc98d40ceb4bd65b7dc5c484987 100644 (file)
@@ -107,7 +107,7 @@ bool wxChoice::Create(
     int  nEditHeight;
     wxGetCharSize( GetHWND(), NULL, &nEditHeight, &vFont );
     nEditHeight = EDIT_HEIGHT_FROM_CHAR_HEIGHT(nEditHeight);
     int  nEditHeight;
     wxGetCharSize( GetHWND(), NULL, &nEditHeight, &vFont );
     nEditHeight = EDIT_HEIGHT_FROM_CHAR_HEIGHT(nEditHeight);
-    SetBestFittingSize(wxSize(-1,nEditHeight+4));   // +2x2 for the border
+    SetInitialSize(wxSize(-1,nEditHeight+4));   // +2x2 for the border
 
     return true;
 } // end of wxChoice::Create
 
     return true;
 } // end of wxChoice::Create
@@ -134,7 +134,7 @@ int wxChoice::DoAppend(
     nIndex = (int)::WinSendMsg( GetHwnd()
                                ,LM_INSERTITEM
                                ,(MPARAM)nIndexType
     nIndex = (int)::WinSendMsg( GetHwnd()
                                ,LM_INSERTITEM
                                ,(MPARAM)nIndexType
-                               ,(MPARAM)rsItem.c_str()
+                               ,(MPARAM)rsItem.wx_str()
                               );
     return nIndex;
 } // end of wxChoice::DoAppend
                               );
     return nIndex;
 } // end of wxChoice::DoAppend
@@ -157,7 +157,7 @@ int wxChoice::DoInsert( const wxString& rsItem, unsigned int pos )
     nIndex = (int)::WinSendMsg( GetHwnd()
                                ,LM_INSERTITEM
                                ,(MPARAM)nIndexType
     nIndex = (int)::WinSendMsg( GetHwnd()
                                ,LM_INSERTITEM
                                ,(MPARAM)nIndexType
-                               ,(MPARAM)rsItem.c_str()
+                               ,(MPARAM)rsItem.wx_str()
                               );
     return nIndex;
 } // end of wxChoice::DoInsert
                               );
     return nIndex;
 } // end of wxChoice::DoInsert
@@ -232,7 +232,7 @@ void wxChoice::SetString(unsigned int n, const wxString& rsStr)
     ::WinSendMsg( GetHwnd()
                  ,LM_INSERTITEM
                  ,(MPARAM)nIndexType
     ::WinSendMsg( GetHwnd()
                  ,LM_INSERTITEM
                  ,(MPARAM)nIndexType
-                 ,(MPARAM)rsStr.c_str()
+                 ,(MPARAM)rsStr.wx_str()
                 );
 
     if (pData)
                 );
 
     if (pData)