Correct custom renderer method override example in the sample.
The implementation of DrawHeaderButton() in MyRenderer should restore the text foreground colour and brush to avoid messing up drawing done after it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -66,8 +66,8 @@ public:
|
||||
wxHeaderSortIconType WXUNUSED(sortArrow) = wxHDR_SORT_ICON_NONE,
|
||||
wxHeaderButtonParams* WXUNUSED(params) = NULL)
|
||||
{
|
||||
dc.SetBrush(*wxBLUE_BRUSH);
|
||||
dc.SetTextForeground(*wxWHITE);
|
||||
wxDCBrushChanger setBrush(dc, *wxBLUE_BRUSH);
|
||||
wxDCTextColourChanger setFgCol(dc, *wxWHITE);
|
||||
dc.DrawRoundedRectangle(rect, 5);
|
||||
dc.DrawLabel(wxT("MyRenderer"), wxNullBitmap, rect, wxALIGN_CENTER);
|
||||
return rect.width;
|
||||
|
Reference in New Issue
Block a user