finding original cell background color in TreeView renderer
- From: Joaquim Schmidlap <schmidlap schmidlap org>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: finding original cell background color in TreeView renderer
- Date: Tue, 29 Apr 2008 08:49:19 -0500
I have a TreeView. Each column has a custom rendering callback
function, which I use to change the color and formatting of the text
in each cell as the data changes.
Under certain data conditions, I change the background color of the
cell to be red, to get the user's attention. I do this with
Gtk::CellRendererText::property_background_gdk() and it works great.
When the error condition clears, I need to set the color back to the
default, since using properties like this seems to be "sticky." In
other words, that cell will stay red until I change it. The problem I
have now is that when I have set_rules_hint(true) for the TreeView, I
need to figure out what color this cell should be based on the
alternating row colors.
Is there a way to query the TreeView for what a given row's
background color "should" be based on the hints? Clearly, it must be
down in the implementation somewhere, but is this interface exposed
to us?
I know I could query the background of some other cell in the row
that didn't change, or maybe stuff the color in the model somewhere,
but that feels a little funky to me. Seems like the TreeView must
know if a given row is odd or even, and therefore what the color
should be.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]