Hi,
Using Glade I insert a pixmap widget into a container (the pixmap widget is not pointing to a file). Then at runtime I create a GdkPixmap with some xpm_data local to the code and use gtk_pixmap_set to set my Glade pixmap widget to the locally created pixmap.
static const char * myXpmData[] = (data not include in e-mail)
GdkPixmap *pixmap; GdkBitmap *mask; GtkStyle *style;
style = gtk_widget_get_style(myWindow);
pixmap = gdk_pixmap_create_from_xpm_d(myWindow, &mask, &style->bg[GTK_STATE_NORMAL], (gchar **)myXmpData);
gtk_pixmap-set(GTK_PIXMAP(myPixmapWidgetFromGlade), pixmap, mask);
The first time the pixmap is displayed it has a shadow (it looks like another pixmap (same image) is behind it and offset to one side). If I cover the pixmap with a window and then remove the window it looks fine.
Thanks for any help,
Lourdes T. Maldonado |