diff --git a/include/wx/mac/carbon/listctrl.h b/include/wx/mac/carbon/listctrl.h index 0b62528075..f3a32ddbc9 100644 --- a/include/wx/mac/carbon/listctrl.h +++ b/include/wx/mac/carbon/listctrl.h @@ -331,6 +331,8 @@ protected: int width, int height, int sizeFlags = wxSIZE_AUTO); + virtual wxSize DoGetBestSize() const; + // common part of all ctors void Init(); diff --git a/src/mac/carbon/listctrl_mac.cpp b/src/mac/carbon/listctrl_mac.cpp index e8d3445065..ad52f2a295 100644 --- a/src/mac/carbon/listctrl_mac.cpp +++ b/src/mac/carbon/listctrl_mac.cpp @@ -397,7 +397,7 @@ bool wxListCtrl::Create(wxWindow *parent, { m_macIsUserPane = true; - if ( !wxWindow::Create(parent, id, pos, size, style, name) ) + if ( !wxWindow::Create(parent, id, pos, size, style & wxNO_BORDER, name) ) return false; m_genericImpl = new wxGenericListCtrlHook(this, id, pos, size, style, validator, name); m_genericImpl->PushEventHandler( new wxMacListCtrlEventDelegate( this, GetId() ) ); @@ -490,6 +490,14 @@ void wxListCtrl::DoSetSize( int x, int y, int width, int height, int sizeFlags ) m_genericImpl->SetSize(x, y, width, height, sizeFlags); } +wxSize wxListCtrl::DoGetBestSize() const +{ + if (m_genericImpl) + return m_genericImpl->GetBestSize(); + + return wxWindow::DoGetBestSize(); +} + bool wxListCtrl::SetFont(const wxFont& font) { bool rv = true;