X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0ed77610ccfedff8cdf0876fdbd0a801decb255b..7564225f8bff6e6c2ed27695836035fa85a81189:/src/mac/carbon/listctrl_mac.cpp diff --git a/src/mac/carbon/listctrl_mac.cpp b/src/mac/carbon/listctrl_mac.cpp index af50932804..5450de5164 100644 --- a/src/mac/carbon/listctrl_mac.cpp +++ b/src/mac/carbon/listctrl_mac.cpp @@ -629,7 +629,9 @@ bool wxListCtrl::Create(wxWindow *parent, if ( !wxWindow::Create(parent, id, pos, size, style & wxNO_BORDER, name) ) return false; - m_genericImpl = new wxGenericListCtrlHook(this, id, pos, size, style, validator, name); + + // since the generic control is a child, make sure we position it at 0, 0 + m_genericImpl = new wxGenericListCtrlHook(this, id, wxPoint(0, 0), size, style, validator, name); m_genericImpl->PushEventHandler( new wxMacListCtrlEventDelegate( this, GetId() ) ); return true; } @@ -719,14 +721,11 @@ void wxListCtrl::DoSetSize( int x, int y, int width, int height, int sizeFlags ) wxControl::DoSetSize(x, y, width, height, sizeFlags); if (m_genericImpl) - m_genericImpl->SetSize(x, y, width, height, sizeFlags); + m_genericImpl->SetSize(0, 0, width, height, sizeFlags); } wxSize wxListCtrl::DoGetBestSize() const { - if (m_genericImpl) - return m_genericImpl->GetBestSize(); - return wxWindow::DoGetBestSize(); }