[Glade-users] images on a button on a toolbar

Damon Chaplin damon@karuna.uklinux.net
11 Feb 2004 22:34:59 +0000


On Wed, 2004-02-11 at 19:02, davidgn@servidor.unam.mx wrote:
> Hello. I need to modify the image on a button on a toolbar to give some
> visual feedback, but I dont know, what widget is the child of the
> button?
> GtkImage? or GtkPixmap? or some other widget that eventually leads to
> one of those two?
> 
> And, how can I pick it in order to modify it? from
> GTK_BIN(my_gtk_button)->child ?
> 
> Have been looking through the archives, and found something similar with
> labels, but being images, I'm not sure

I think the button is usually a vbox or hbox with a GtkImage and maybe a
label in it.

You can possibly step through GTK_TOOLBAR(toolbar)->children to find the
GtkToolbarChild you need to change. See the toolbar source code in
gtktoolbar.h/c

(Note that the toolbar is changing quite a bit in the next GTK+ release
so this may not work then.)

Damon