From: Václav Slavík Date: Tue, 25 Dec 2001 23:34:57 +0000 (+0000) Subject: fixed misplaced subcontrols of wxComboBox X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c2ef70ec8aae8e28bfc82d59c0519d06234dd4ec fixed misplaced subcontrols of wxComboBox git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index dc644e1699..54ce379716 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -314,8 +314,9 @@ void wxComboControl::DoMoveWindow(int x, int y, int width, int height) wxSize sizeBtn = m_btn->GetBestSize(); wxCoord wText = width - sizeBtn.x; - m_text->SetSize(x, y, wText, height); - m_btn->SetSize(x + wText, y, sizeBtn.x, height); + 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); } // ----------------------------------------------------------------------------