Re: GTK TreeView Column Header Colors
- From: Tim Evans <t evans aranz com>
- To: "Carl B. Constantine" <duckwing duckwing ca>
- Cc: gtk-list gnome org
- Subject: Re: GTK TreeView Column Header Colors
- Date: Thu, 20 Nov 2003 10:02:47 +1300
Carl B. Constantine wrote:
* Mike Dailey (daileyml sbcglobal net) 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/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]