X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e778b8f059449d473052463ccad26cd32f19a7d2..136518e5c08bfb00413cd071929b857883ab2656:/wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp diff --git a/wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp b/wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp index 1c0f6066e1..bebd08d5f1 100644 --- a/wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp +++ b/wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include "wx/treelistctrl.h" @@ -4652,8 +4653,7 @@ void wxTreeListCtrl::CalculateAndSetHeaderHeight() } } - -void wxTreeListCtrl::OnSize(wxSizeEvent& WXUNUSED(event)) +void wxTreeListCtrl::DoHeaderLayout() { int w, h; GetClientSize(&w, &h); @@ -4664,6 +4664,11 @@ void wxTreeListCtrl::OnSize(wxSizeEvent& WXUNUSED(event)) } if (m_main_win) m_main_win->SetSize(0, m_headerHeight + 1, w, h - m_headerHeight - 1); +} + +void wxTreeListCtrl::OnSize(wxSizeEvent& WXUNUSED(event)) +{ + DoHeaderLayout(); } @@ -5014,7 +5019,10 @@ wxString wxTreeListCtrl::GetColumnText(size_t column) const { return m_header_win->GetColumnText(column); } void wxTreeListCtrl::AddColumn(const wxTreeListColumnInfo& col) -{ m_header_win->AddColumn(col); } +{ + m_header_win->AddColumn(col); + DoHeaderLayout(); +} void wxTreeListCtrl::InsertColumn(size_t before, const wxTreeListColumnInfo& col)