From: Jaakko Salli Date: Mon, 20 Dec 2010 11:27:13 +0000 (+0000) Subject: Have wxUniv wxComboBox inherit from wxItemContainer instead of wxComboBoxBase, since... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a7f62f39092512cda56bc0bb89cdabf156f05385?ds=inline Have wxUniv wxComboBox inherit from wxItemContainer instead of wxComboBoxBase, since the latter is derived from wxTextEntry which conflicts with the recent change in wxComboCtrl (fixes #12789) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/univ/combobox.h b/include/wx/univ/combobox.h index 7fef4303bf..93b3128633 100644 --- a/include/wx/univ/combobox.h +++ b/include/wx/univ/combobox.h @@ -31,7 +31,10 @@ class WXDLLIMPEXP_FWD_CORE wxListBox; // wxComboBox: a combination of text control and a listbox // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxComboBox : public wxComboCtrl, public wxComboBoxBase +// NB: Normally we'd like wxComboBox to inherit from wxComboBoxBase, but here +// we can't really do that since both wxComboBoxBase and wxComboCtrl inherit +// from wxTextCtrl. +class WXDLLIMPEXP_CORE wxComboBox : public wxComboCtrl, public wxItemContainer { public: // ctors and such @@ -118,6 +121,15 @@ public: virtual bool CanUndo() const; virtual bool CanRedo() const; + // override these methods to disambiguate between two base classes versions + virtual void Clear() + { + wxComboCtrl::Clear(); + wxItemContainer::Clear(); + } + + bool IsEmpty() const { return wxItemContainer::IsEmpty(); } + // wxControlWithItems methods virtual void DoClear(); virtual void DoDeleteOneItem(unsigned int n);