Add wxListCtrl::SetHeaderAttr()

This method can be used to change the list view header appearance.

Add the method declaration, documentation, show it in the sample and implement
it for wxMSW (only, for now).
This commit is contained in:
Vadim Zeitlin
2016-04-17 17:43:09 +02:00
parent dfb993274c
commit 5388c7a72e
7 changed files with 154 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
#include "wx/vector.h"
class wxMSWListItemData;
class wxMSWListHeaderCustomDraw;
// define this symbol to indicate the availability of SetColumnsOrder() and
// related functions
@@ -115,6 +116,9 @@ public:
bool SetForegroundColour(const wxColour& col);
bool SetBackgroundColour(const wxColour& col);
// Header attributes
virtual bool SetHeaderAttr(const wxItemAttr& attr) wxOVERRIDE;
// Gets information about this column
bool GetColumn(int col, wxListItem& item) const;
@@ -461,6 +465,10 @@ private:
void OnCharHook(wxKeyEvent& event);
// Object using for header custom drawing if necessary, may be NULL.
wxMSWListHeaderCustomDraw* m_headerCustomDraw;
wxDECLARE_DYNAMIC_CLASS(wxListCtrl);
wxDECLARE_EVENT_TABLE();
wxDECLARE_NO_COPY_CLASS(wxListCtrl);