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:
Vadim Zeitlin
2010-03-06 00:31:00 +00:00
parent 98e956503d
commit 1bab36277c
3 changed files with 32 additions and 8 deletions

View File

@@ -146,13 +146,15 @@ protected:
void OnFreeze(wxCommandEvent& event);
void OnThaw(wxCommandEvent& event);
void OnToggleLines(wxCommandEvent& event);
void OnToggleHeader(wxCommandEvent& event);
#ifdef __WXOSX__
void OnToggleMacUseGeneric(wxCommandEvent& event);
#endif // __WXOSX__
void OnFind(wxCommandEvent& event);
void OnUpdateShowColInfo(wxUpdateUIEvent& event);
void OnUpdateUIEnableInReport(wxUpdateUIEvent& event);
void OnUpdateToggleMultiSel(wxUpdateUIEvent& event);
void OnUpdateToggleHeader(wxUpdateUIEvent& event);
wxImageList *m_imageListNormal;
wxImageList *m_imageListSmall;
@@ -216,6 +218,7 @@ enum
LIST_SET_FG_COL,
LIST_SET_BG_COL,
LIST_TOGGLE_MULTI_SEL,
LIST_TOGGLE_HEADER,
LIST_TOGGLE_FIRST,
LIST_SHOW_COL_INFO,
LIST_SHOW_SEL_INFO,