Add possibility to set item background in generic wxDataViewCtrl.
Added wxDataViewItemAttr::SetBackgroundColour() and code to honour it in the generic implementation of wxDataViewCtrl. Closes #12621. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -822,6 +822,18 @@ bool wxDataViewCustomRendererBase::ActivateCell(const wxRect& cell,
|
||||
return Activate(cell, model, item, col);
|
||||
}
|
||||
|
||||
void wxDataViewCustomRendererBase::RenderBackground(wxDC* dc, const wxRect& rect)
|
||||
{
|
||||
if ( !m_attr.HasBackgroundColour() )
|
||||
return;
|
||||
|
||||
const wxColour& colour = m_attr.GetBackgroundColour();
|
||||
wxDCPenChanger changePen(*dc, colour);
|
||||
wxDCBrushChanger changeBrush(*dc, colour);
|
||||
|
||||
dc->DrawRectangle(rect);
|
||||
}
|
||||
|
||||
void
|
||||
wxDataViewCustomRendererBase::WXCallRender(wxRect rectCell, wxDC *dc, int state)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user