X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9657c19785f5cd7039a2d4a118d19f08d198f91e..33a1719a95b800e06231c0b2e3337cbe2632eb34:/src/generic/datavgen.cpp diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 44eef8c70e..fb301b760d 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -4093,6 +4093,10 @@ void wxDataViewCtrl::Init() { m_cols.DeleteContents(true); m_notifier = NULL; + + // No sorting column at start + m_sortingColumn = NULL; + m_headerArea = NULL; } bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, @@ -4102,14 +4106,14 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, if ( (style & wxBORDER_MASK) == 0) style |= wxBORDER_SUNKEN; + Init(); + if (!wxControl::Create( parent, id, pos, size, style | wxScrolledWindowStyle, validator)) return false; SetInitialSize(size); - Init(); - #ifdef __WXMAC__ MacSetClipChildren( true ); #endif @@ -4151,6 +4155,15 @@ WXLRESULT wxDataViewCtrl::MSWWindowProc(WXUINT nMsg, } #endif +wxSize wxDataViewCtrl::GetSizeAvailableForScrollTarget(const wxSize& size) +{ + wxSize newsize = size; + if (!HasFlag(wxDV_NO_HEADER) && (m_headerArea)) + newsize.y -= m_headerArea->GetSize().y; + + return newsize; +} + void wxDataViewCtrl::OnSize( wxSizeEvent &WXUNUSED(event) ) { // We need to override OnSize so that our scrolled