Ensure that wxGenericListCtrl always has wx[HV]SCROLL styles.
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
This commit is contained in:
parent
7e843c0e2b
commit
e61fedabe7
@ -4419,6 +4419,11 @@ void wxGenericListCtrl::SetSingleStyle( long style, bool add )
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user