]> git.saurik.com Git - wxWidgets.git/commitdiff
Sizing fixes for generic control.
authorKevin Ollivier <kevino@theolliviers.com>
Thu, 2 Nov 2006 18:17:24 +0000 (18:17 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Thu, 2 Nov 2006 18:17:24 +0000 (18:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/mac/carbon/listctrl.h
src/mac/carbon/listctrl_mac.cpp

index 0b62528075ccf8f940d051953f017bb5ba5312df..f3a32ddbc91a08eca4496197f1f1fe14ddb87e33 100644 (file)
@@ -331,6 +331,8 @@ protected:
                          int width, int height,
                          int sizeFlags = wxSIZE_AUTO);
 
+  virtual wxSize DoGetBestSize() const;
+
   // common part of all ctors
   void Init();
   
index e8d3445065fdd896ad9327048067025046bcf677..ad52f2a295a452192069b5c8c1e594432ffd752a 100644 (file)
@@ -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;