Re: GTK TreeView Column Header Colors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Carl B. Constantine wrote:

* Mike Dailey (daileyml@xxxxxxxxxxxxx) wrote:

Is it possible to change the foreground and background
color of the column header in a GTK TreeView, using a
ListStore as the model?


Nope, I tried and tried. the Header lables, AFAICT, cannot be changed
from the standard colors. I'd be interested if anyone can prove me wrong
though.

It is possible, just not particularly obvious. What you need to do is call gtk_tree_view_column_set_widget, passing in your own label that is set to display the column title. Once the label is shown and realized, call gtk_widget_get_parent three times, which should move up through a GtkAlignment and a GtkHBox to give you a GtkButton. This button is the column header. Calling gtk_widget_modify_bg on it will change the background colour of the column header.


--
Tim Evans
Applied Research Associates NZ
http://www.aranz.com/

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux