]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/combobox.cpp
add wxMBConvStrictUTF8 class implementing just UTF-8 conversion, without support...
[wxWidgets.git] / src / univ / combobox.cpp
index 89130b4e3cc35fd1360f6d8758c712c4a53c70c9..f347cfe1b97082e25b9b7ae5489365306bf2368d 100644 (file)
@@ -122,8 +122,8 @@ bool wxComboListBox::Create(wxWindow* parent)
     if ( !wxListBox::Create(parent, wxID_ANY,
                             wxDefaultPosition, wxDefaultSize,
                             0, NULL,
-                            wxBORDER_SIMPLE | wxLB_INT_HEIGHT |
-                            m_combo->GetWindowStyle() & wxCB_SORT ? wxLB_SORT : 0) )
+                            wxBORDER_SIMPLE |
+                            ( m_combo->GetWindowStyle() & wxCB_SORT ? wxLB_SORT : 0 ) ) )
         return false;
 
     // we don't react to the mouse events outside the window at all
@@ -389,8 +389,12 @@ void wxComboBox::SetSelection(int n)
     wxCHECK_RET( (n == wxNOT_FOUND || IsValid(n)), _T("invalid index in wxComboBox::Select") );
 
     GetLBox()->SetSelection(n);
-    if ( GetTextCtrl() )
-        GetTextCtrl()->SetValue(GetLBox()->GetString(n));
+
+    wxString str;
+    if ( n != wxNOT_FOUND )
+        str = GetLBox()->GetString(n);
+
+    SetText(str);
 }
 
 int wxComboBox::GetSelection() const