X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/150e31d2088687cbfbab548f9e98918f8683d9b5..9e7efd538e888419f278d621f39c8776d28f3b18:/src/univ/combobox.cpp diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 20a06a61d4..dbe2c63b75 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; @@ -763,7 +765,7 @@ long wxComboBox::GetInsertionPoint() const return GetText()->GetInsertionPoint(); } -long wxComboBox::GetLastPosition() const +wxTextPos wxComboBox::GetLastPosition() const { return GetText()->GetLastPosition(); } @@ -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") ); @@ -892,7 +894,7 @@ wxClientData* wxComboBox::DoGetItemClientObject(int n) const bool wxComboBox::IsEditable() const { - return GetText() != NULL && (!HasFlag(wxCB_READONLY) || GetText()->IsEditable()); + return GetText() != NULL && (!HasFlag(wxCB_READONLY) || GetText()->IsEditable()); } void wxComboBox::Undo()