Allow showing rules and background on entire wxListCtrl window

Previously they were both limited to the part occupied by the items
only, add a new method allowing to extend them to the whole client
window area.

See https://github.com/wxWidgets/wxWidgets/pull/2106
This commit is contained in:
Marcos
2020-10-30 14:27:42 -03:00
committed by Vadim Zeitlin
parent 1cf7c47934
commit 584d1ae47d
6 changed files with 131 additions and 10 deletions

View File

@@ -775,6 +775,17 @@ public:
selected ? ++m_selCount : --m_selCount;
}
void DrawInReportModeOnBlank ( wxDC *dc,
const wxRect& rect,
int lineNumber );
void SetListRulesAlternateColourOnBlank( const bool state,
const wxColour& colour)
{
m_listRulesAlternateColourOnBlank = state;
m_alternateColourOnBlank = colour;
}
protected:
// the array of all line objects for a non virtual list control (for the
// virtual list control we only ever use m_lines[0])
@@ -941,6 +952,13 @@ private:
friend class wxGenericListCtrl;
friend class wxListCtrlMaxWidthCalculator;
// tells whether or not to paint empty rows with alternate colour and draw
// rulers on empty rows
bool m_listRulesAlternateColourOnBlank;
// colour to paint empty rows (zebra effect)
wxColour m_alternateColourOnBlank;
};
#endif // wxUSE_LISTCTRL