Although these styles are unconditionally added when creating the window they
could be reset by calling SetWindowStyleFlag() later and this in fact happened
when changing control mode from wxListbook.
As it doesn't make sense to have wxListCtrl without these styles, also add
them unconditionally in overridden SetWindowStyleFlag() as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64882
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxGenericListCtrl::SetWindowStyleFlag( long flag )
{
void wxGenericListCtrl::SetWindowStyleFlag( long flag )
{
+ // we add wxHSCROLL and wxVSCROLL in ctor unconditionally and it never
+ // makes sense to remove them as we'll always add scrollbars anyhow when
+ // needed
+ flag |= wxHSCROLL | wxVSCROLL;
+
const bool wasInReportView = HasFlag(wxLC_REPORT);
// update the window style first so that the header is created or destroyed
const bool wasInReportView = HasFlag(wxLC_REPORT);
// update the window style first so that the header is created or destroyed