SetBackgroundColour on wxDataViewCtrl

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

SetBackgroundColour on wxDataViewCtrl

Post by spectrum » Thu Oct 08, 2009 6:25 am

Hello All,

i am using 2.9.0, last snapshot,

On a class derived from wxDataViewCtrl

SetBackgroundColour(wxColor(255,0,0));

is not working, color stay white only.

looking the library 2.9.0 code:

Code: Select all

void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
{

    wxDataViewModel *model = GetOwner()->GetModel();
    wxAutoBufferedPaintDC dc( this );

#ifdef WXMSW

    dc.SetPen( *wxTRANSPARENT_PEN );
    dc.SetBrush( wxBrush( GetBackgroundColour()) );
    dc.SetBrush( *wxWHITE_BRUSH ); // < -- forgotten here for test ?
    wxSize size( GetClientSize() );
    dc.DrawRectangle( 0,0,size.x,size.y );

#endif

    ...
I am considering it a bug, trying now to get some feedback from the bugtracking,


But maybe i am doing something wrong ..
Any help is really appreciated.
Thanks
spectrum

Post Reply