Fix toggling the header in the generic wxListCtrl.
We need to update the lfags first before deciding whether we should create or destroy the header. Also add a test for toggling the header to the listctrl sample. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4446,6 +4446,10 @@ void wxGenericListCtrl::SetSingleStyle( long style, bool add )
|
||||
|
||||
void wxGenericListCtrl::SetWindowStyleFlag( long flag )
|
||||
{
|
||||
// update the window style first so that the header is created or destroyed
|
||||
// corresponding to the new style
|
||||
wxWindow::SetWindowStyleFlag( flag );
|
||||
|
||||
if (m_mainWin)
|
||||
{
|
||||
// m_mainWin->DeleteEverything(); wxMSW doesn't do that
|
||||
@@ -4454,8 +4458,6 @@ void wxGenericListCtrl::SetWindowStyleFlag( long flag )
|
||||
|
||||
GetSizer()->Layout();
|
||||
}
|
||||
|
||||
wxWindow::SetWindowStyleFlag( flag );
|
||||
}
|
||||
|
||||
bool wxGenericListCtrl::GetColumn(int col, wxListItem &item) const
|
||||
|
Reference in New Issue
Block a user