Re: How to use the treeview column title style for a button?
- From: Kristian Rietveld <kris imendio com>
- To: Bastiaan Veelo <bastiaan sarc nl>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How to use the treeview column title style for a button?
- Date: Mon, 8 Oct 2007 12:20:29 +0200
Hi,
On Sun, Oct 07, 2007 at 12:35:01PM +0200, Bastiaan Veelo wrote:
I am a style newbie. I want some of the buttons in my widget to look
like the column title buttons in a treeview. How do I do that?
As far as I know themes style the buttons in the column headers of
GtkTreeView by using a "widget path" indicating that the parent of the
buttons is a GtkTreeView: "*.GtkTreeView.GtkButton". Using
gtk_rc_get_style_by_paths() you can get the style corresponding to this
widget path. Then apply the style to the widget using
gtk_widget_set_style().
Something like this seems to work for me:
button = gtk_button_new_with_label ("...");
style = gtk_rc_get_style_by_paths (gtk_widget_get_settings (button),
"*.GtkTreeView.GtkButton",
NULL,
G_OBJECT_TYPE (button));
gtk_widget_set_style (button, style);
regards,
-kris.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]