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?
img = gtk.image() img.set_from_file(filename) new = gtk.imagemenuitem(gtk.stock_new, 'new') new.set_image(img)
Comments
Post a Comment