X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6fc052ae5c77cbf627d9d5f076ad93cd3a3e5a5..e216f7c8cfb235fbf6a3ba6301eb4b17c5528aae:/src/univ/combobox.cpp diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 89130b4e3c..b615a9b537 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -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