]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/combobox.cpp
Added size constants to allow drawn control parts to match the window variant,
[wxWidgets.git] / src / univ / combobox.cpp
index 89130b4e3cc35fd1360f6d8758c712c4a53c70c9..b615a9b53727ae8294a715ce9df5615956e337b8 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,8 @@ 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));
+
+    SetText(GetLBox()->GetString(n));
 }
 
 int wxComboBox::GetSelection() const