Pixmap for a background



Hello,

I've been trying to set the background of a Notebook to a pixmap. I have been able to successfully accomplish this with a color by putting an eventbox as the background and calling gtk_widget_modify_bg, however, I can't find anything comparable for pixmaps.

I've also tried this:
GdkBitmap *bmp;
GtkWidget *img=gtk_image_new_from_file("test.png");
GdkPixmap *map;
gdk_pixbuf_render_pixmap_and_mask(gtk_image_get_pixbuf(img),&map,NULL,255);
gdk_window_set_back_pixmap(testwin->window,map,FALSE);

I noticed that I can see the background image on repaint for a second, but it then gets painted gray.

Thanks in advance for any help,

Eric




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