(no subject)



Tim:

Thank you!  That works beautifully!  My app looks MUCH
better now with a little color!

Thanks a million!

Now if I can figure out how to add space between
columns, my data won't look so bunched up.

Thanks,

Mike Dailey


Message: 6
Date: Thu, 20 Nov 2003 10:02:47 +1300
From: Tim Evans <t evans aranz com>
Organization: Applied Research Associates NZ Ltd
To: "Carl B. Constantine" <duckwing duckwing ca>
Cc: gtk-list gnome org
Subject: Re: GTK TreeView Column Header Colors

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]