Re: [gtk-list] backround pixmap




On Mon, 1 Feb 1999, Blake Hegerle wrote:

> Is there a way to give a window a backround pixmap, that is drawn under
> other widgets, or should I use some sort of theme(gtkrc)

You can set the style from within the code rather than from within a gtkrc
file. Do something like this:

   GtkWidget *widget;
   GtkStyle *style;
   GdkImlibImage *im;
   GdkPixmap *pic;

   im = gdk_imlib_load_image("image.png");
   gdk_imlib_render(im, im->rgb_width, im->rgb_height);
   pic = gdk_imlib_move_image(im);
   style->bg_pixmap[GTK_STATE_NORMAL] = pic;
   gtk_widget_set_style(widget, style);


Regards,
   Cody



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