X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7d8268a1d64de58aab194e4d8ae800c755990aad..9c43d88f6d47342edafa8b5e502e33a7ce2b6d98:/src/univ/combobox.cpp diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 1a544c825e..5c751f5aa9 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -122,13 +122,15 @@ public: virtual ~wxComboListBox(); // implement wxComboPopup methods - virtual bool SetSelection(const wxString& value); - virtual void SetSelection(int n, bool select) - { wxListBox::SetSelection( n, select); }; + virtual bool SetSelection(const wxString& s); virtual wxControl *GetControl() { return this; } virtual void OnShow(); virtual wxCoord GetBestWidth() const; + // fix virtual function hiding + virtual void SetSelection(int n) { DoSetSelection(n, true); } + void SetSelection(int n, bool select) { DoSetSelection(n, select); } + protected: // we shouldn't return height too big from here virtual wxSize DoGetBestClientSize() const; @@ -574,7 +576,7 @@ void wxComboListBox::OnSelect(wxCommandEvent& event) event2.SetId(m_combo->GetId()); m_combo->ProcessEvent(event2); } - //else: ignore the events resultign from just moving the mouse initially + //else: ignore the events resulting from just moving the mouse initially } void wxComboListBox::OnShow() @@ -612,7 +614,7 @@ void wxComboListBox::OnMouseMove(wxMouseEvent& event) // while a wxComboListBox is shown, it always has capture, so if it doesn't // we're about to go away anyhow (normally this shouldn't happen at all, // but I don't put assert here as it just might do on other platforms and - // it doesn't break anythign anyhow) + // it doesn't break anything anyhow) if ( this == wxWindow::GetCapture() ) { if ( HitTest(event.GetPosition()) == wxHT_WINDOW_INSIDE ) @@ -832,7 +834,7 @@ int wxComboBox::FindString(const wxString& s) const return GetLBox()->FindString(s); } -void wxComboBox::Select(int n) +void wxComboBox::SetSelection(int n) { wxCHECK_RET( (n >= 0) && (n < GetCount()), _T("invalid index in wxComboBox::Select") );