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

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

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -