[gtk-list] Re: Button with Image for Toolbar




> >   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



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