Can you set multiple wxGrid Colum Attributes?

Bob wxwidgets at gmail.com
Fri Jan 11 05:39:02 PST 2008


On 1/11/08, Petr Smilauer <petrsm at jcu.cz> wrote:
>
>
> > ColumnAttr->SetBackgroundColour( default_cell_background_color );
> >
> > ColumnAttr->SetReadOnly();
> >
> > m_LogGrid->SetColAttr( LogGridColDate, ColumnAttr );
> >
> > m_LogGrid->SetColAttr( LogGridColEventInHuman, ColumnAttr );
> >
> > m_LogGrid->SetColAttr( LogGridColEvent, ColumnAttr );
> >
> > which solved the ReadOnly problem, but did not solve
> > the color problem.
>
> Right, so you are doing both operations at the same time.
> What does your "color problem" mean?


That the above code is not restoring the grid to the default
background color.


> I do not know why this does not work, it should.


I went back and looked at old project of mine.
I used the same code as above and it did restore
the background colors when I was using wx263.

Isn't this just an
> window refresh problem (have you tried to hide and uncover the
> grid area)?


I don't want it to flicker, so no I didn't try that.

If not, I suggest you set breakpoint on one of these SetColAttr calls
> and see whether they are replaced (down there in the
> wxGridCellAttrProvider::SetColAttr  function). Perhaps a deeper
> understanding will make you change your current approach and
> write your own attribute provider class ;-)


The idea of using any framework is to save development time,
not use it up.  The boss expects this project to ship in his
life time, which may exceed mine if it doesn't work. ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wx-users/attachments/20080111/5f7=
be332/attachment.htm


More information about the wx-users mailing list