[pygtk] create a gtk.Button without any label

Marcus Habermehl bmh1980de at yahoo.de
Tue Nov 27 03:03:30 WST 2007


awalter1 schrieb:
> Hi,
> 
> I'm looking about how to create a button with only a stock item and no
> label.
> 
> The unique solution I've found is :
> button = gtk.Button(stock=gtk.STOCK_SAVE)  			
> alignment = button.get_children()[0]
> hboxtemp = alignment.get_children()[0]
> image, text = hboxtemp.get_children()
> text.set_text(' ')
> 
> 
> Is there a more simple solution ?

Try this.
button = gtk.ToolButton(gtk.STOCK_SAVE)

Best regards
Marcus


More information about the pygtk mailing list