Re: GTK TreeView Column Header Colors



Tim Evans wrote:
>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.

Thanks for this "insider tip"! I realised that this might also be a
workaround the problem I had setting tooltips to treeview column headers
(also clist's). I tried it and it was.
Setting the tooltip to the result of a triply nested Get_Parent call on
the label does the trick. The fact that it must be shown and realized
also makes it more cumbersome than the old method with eventboxes though.
The next Gtk version will probably get a new routine for it.

Manuel





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