Sort of autoresize if only 1 column is there
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -992,6 +992,8 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
|
||||
|
||||
::SetDataBrowserTableViewHiliteStyle( this->m_peer->GetControlRef(), kDataBrowserTableViewFillHilite );
|
||||
|
||||
::SetDataBrowserTableViewGeometry( this->m_peer->GetControlRef(), true, false );
|
||||
|
||||
return true;
|
||||
} /* wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator) */
|
||||
|
||||
@@ -1456,6 +1458,19 @@ void wxDataViewCtrl::OnSize(wxSizeEvent& event)
|
||||
dataViewCustomRendererPtr->SetDC(NULL); // reset DC because DC has changed
|
||||
} /* if */
|
||||
} /* for */
|
||||
|
||||
wxMacDataViewDataBrowserListViewControlPointer MacDataViewListCtrlPtr(dynamic_cast<wxMacDataViewDataBrowserListViewControlPointer>(this->m_peer));
|
||||
ControlRef ref = MacDataViewListCtrlPtr->GetControlRef();
|
||||
if (NoOfColumns == 1)
|
||||
{
|
||||
::SetDataBrowserHasScrollBars( ref, false, true );
|
||||
::AutoSizeDataBrowserListViewColumns( ref );
|
||||
}
|
||||
if (NoOfColumns > 1)
|
||||
{
|
||||
::SetDataBrowserHasScrollBars( ref, true, true );
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
} /* wxDataViewCtrl::OnSize(wxSizeEvent&) */
|
||||
|
||||
|
Reference in New Issue
Block a user