Take the 2-minute tour ×

How to set gtk "Style Properties" listed in gtk documentation?
like for GtkWidget there are Style Properties:

  "separator-height"         gint                  : Read
  "separator-width"          gint                  : Read

So how to get and set them? using GTK+ and C.

Thanks, PP.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

For example:

gint height, width;
gtk_widget_style_get(widget, "separator-height", &height, "separator-width", &width, NULL);

It works like g_object_get(). There is no corresponding gtk_widget_style_set() though, you have to set them through a RC file, which you load using gtk_rc_parse(). Here is the documentation on RC files.

Just to be clear though, users generally don't like it when you mess with their themes.

share|improve this answer
Thanks... one more thing when we use bg_pixmap[NORMAL] = pixmap in rc file where do we keep that image. Is it a normal png,jpg image or it is other formats? –  A_user Mar 30 '10 at 5:00
add comment

Your Answer


