fixed misplaced subcontrols of wxComboBox

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2001-12-25 23:34:57 +00:00
parent 5acaf196e7
commit c2ef70ec8a

View File

@ -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);
}
// ----------------------------------------------------------------------------