[Gtk-sharp-list] Set custom icon for toolbar Button or MenuItem

Stefan Saring stefan@saring.de
Tue, 18 May 2004 22:16:35 +0200


thanks for the hint for the ImageMenuItem class. The following code but
does not work. The image is successfully loaded, but not showed in the
GUI (empty image in the menuitem). Can you tell me what's wrong with my
code ?

ImageMenuItem imiStatistic = (ImageMenuItem) miStatistic; 
Gdk.Pixbuf pbStatistic = new Gdk.Pixbuf (null, "mi-statistic.png");
imiStatistic.Image = new Gtk.Image (pbStatistic);

And does anyone has an idea how the custom icon setting can be done for
toolbar buttons ?