[74] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: Button with Image for Toolbar
daemon@ATHENA.MIT.EDU (Owen Taylor)
Sat May 10 11:04:19 1997
To: gtk-list@redhat.com
From: Owen Taylor <owt1@cornell.edu>
Date: 10 May 1997 11:04:31 -0400
In-Reply-To: Sascha Ziemann's message of Sat, 10 May 1997 11:12:16 +0200
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
> > button = gtk_button_new ();
> > bitmap = gdk_bitmap_create_from_data (NULL,
> > eject_bits,
> > eject_width, eject_height);
> >
> > pixmap = gtk_pixmap_new (bitmap, bitmap, bitmap, bitmap, bitmap);
> >
> > gtk_misc_set_alignment (GTK_MISC (pixmap), 0.5, 0.5);
> >
> > gtk_container_add (GTK_CONTAINER (button), pixmap);
> > gtk_widget_show (pixmap);
Perhaps the problem is that the pixmap is shown before it's parent
widget (the button) has a parent. I've sometimes had problems like
this. (It probably needs fixing, at least to give an informative
error message - the "bad match" comes later because X data structures
have been corrupted.)
Just a guess,
Owen
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null