python - How can a custom icon be used in an image menu item? -


i can create menu items icons:

new = gtk.imagemenuitem(gtk.stock_new, 'new') 

but how can use custom icon - file?

http://library.gnome.org/devel/pygtk/stable/class-gtkimagemenuitem.html#method-gtkimagemenuitem--set-image

img = gtk.image() img.set_from_file(filename) new = gtk.imagemenuitem(gtk.stock_new, 'new') new.set_image(img) 

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -