From c2ef70ec8aae8e28bfc82d59c0519d06234dd4ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 25 Dec 2001 23:34:57 +0000 Subject: [PATCH] fixed misplaced subcontrols of wxComboBox git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/combobox.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } // ---------------------------------------------------------------------------- -- 2.47.2