ons 2004-01-14 klockan 15.22 skrev John Hunter:
> While I know it is generally frowned up on to use stock buttons for
> purposes other than their original intentions to preserve consistent
> look and feel across applications, I often find myself wanting to use
> a different label with a stock icon.
> 
> I suspect this isn't possible from my reading of the docs, but I
> thought I'd ask.  I'd like to be able to do something like
> 
>     button = gtk.Button(stock=gtk.STOCK_CANCEL)
>     button.show()
>     button.set_use_stock(gtk.TRUE)
>     button.set_label('Hide')

Try to create a new GtkImage (using gtk.image_new_from_stock) and add it
and a GtkLabel to a GtkHBox which you pack into a GtkButton.
Should do it.

-- 
|#| Johan Dahlin < johan (at) gnome (dot) org> | Nordenskioldsg. 19 |#|
|#| Web:   http://www.async.com.br/~jdahlin/   | 413 09 Gothenburg  |#|
|#| Phone: +46 (0)735-570778                   | Sweden             |#|

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to