John Finlay wrote:
> A better way would be to use a ToolButton instead of a Button but don't
> put it in a Toolbar. It will automatically use only the icon if not in a
> ToolBar:
>
> b=gtk.ToolButton(gtk.STOCK_CLOSE)
>
> John
Oh, I didn't know I could do that. Nice. The look is a bit different,
but that's not much of a problem...
Víctor M. Hernández Rocamora ha scritto:
> Maybe this is helpful:
>
> close_button = gtk.Button()
> close_button.add(gtk.image_new_from_stock(gtk.STOCK_CLOSE,
gtk.ICON_SIZE_MENU) )
>
... but this is better, since it also gives me easy access to the icon
size, which I need!
Many thanks to everybody!
Francesco.
P.S. Just in case somebody else needs it - if you don't have a
show_all() in an ancestor of the button (I don't), you need to show()
the image as well, so you'd have something like
close_button = gtk.Button()
img = gtk.image_new_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_MENU)
img.show()
close_button.add(img)
close_button.show()
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/