[Glade-users] Changing the image of a pixmap
- From: cfreeze cs clemson edu (Chris Freeze)
- Subject: [Glade-users] Changing the image of a pixmap
- Date: Tue, 03 Oct 2000 18:55:23 -0500 (CDT)
I'm creating a dialog in glade that has a few buttons and a pixmap. I've been
able to change the text of the buttons but not able to change the image that's
displayed.
The following code segfaults inside of gdk_bitmap_ref. I've seen how to do
this using just Gtk code, but not with a glade generated object. Any
suggestions on where I am going wrong?
GtkWidget *Pixmap;
GtkStyle *Style;
GdkPixmap *Image;
GdkBitmap *ImageMask;
Style = gtk_widget_get_style(lookup_widget(Dialog,"dialog_widget"));
Image =
gdk_pixmap_create_from_xpm(lookup_widget(Dialog,"dialog_widget")->window,
ImageMask,
&lookup_widget(Dialog,"dialog_widget")->style->bg[GTK_STATE_NORMAL],
"error32.xpm");
//image is the name given to the pixmap entry in glade
gtk_pixmap_set(GTK_PIXMAP(lookup_widget(Dialog,"image")),Image,ImageMask);
Regards,
Chris
-----
Chris Freeze Email: cfreeze cs clemson edu
Web: http://www.cs.clemson.edu/~cfreeze
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]