1

Let's say I have a gtable in a gwindow like this:

library(gWidgets)
options("guiToolkit"="RGtk2")
w <- gwindow()
dat <- data.frame(letter=letters, number=1:length(letters))
tab <- gtable(dat, container=w)

I'd like to be able to set the background color of individual rows arbitrarily, such as based on the value of a column of that row (e.g., all rows with vowels turned red).

Is this possible? I don't know a lot about Gtk at all, but I can learn if someone could point me in the right direction, such as, how can I access the row object in order to apply a Gtk function to it to change its color.

Thanks for your help!

ballparts
  • 11
  • 1
  • using `gWidgets2` is recommended. There the `$widget` component should be a `gtkTreeView` instance. You would likely need to get the cell renderers and from there modify the `foreground` attribute. – jverzani Nov 14 '16 at 16:55
  • @jverzani Thanks for the reply. Why is gWidgets2 recommended? – ballparts Nov 24 '16 at 15:01
  • Because bugs get fixed for that package when they get pointed out. It is also a bit faster in testing. – jverzani Nov 27 '16 at 20:33

0 Answers0