X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6179a847d8899cceb8880abc2ab2fe9d0244c90..9c112555198f51fcec71106530cddba95a17f3dc:/src/univ/combobox.cpp?ds=sidebyside diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 9d771ab73f..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; @@ -328,7 +330,7 @@ void wxComboControl::DoMoveWindow(int x, int y, int width, int height) wxSize sizeBtn = m_btn->GetBestSize(); wxCoord wText = width - sizeBtn.x; - wxPoint p = GetParent() ? GetParent()->GetClientAreaOrigin() : wxPoint(); + wxPoint p = GetParent() ? GetParent()->GetClientAreaOrigin() : wxPoint(0,0); m_text->SetSize(x - p.x, y - p.y, wText, height); m_btn->SetSize(x - p.x + wText, y - p.y, sizeBtn.x, height); }