[pygtk] accelerator for an image button.

Neil Dugan pygtk at butterflystitches.com.au
Sat Nov 3 13:15:17 WST 2007


Hi

I am new to this list.

I am trying to make an python/gtk+ app.  One problem I am having is
attaching an accelerator to a image button.

This is the code I am using to create the buttons.

--- cut ---
	def index_control(self):
		hbox = gtk.HBox()
		for stock in
[gtk.STOCK_GOTO_FIRST,gtk.STOCK_GO_BACK,gtk.STOCK_GO_FORWARD,gtk.STOCK_GOTO_LAST] :
			image = gtk.Image()
			image.set_from_stock(stock,gtk.ICON_SIZE_MENU)
			button = gtk.Button()
			button.set_image(image)
			hbox.pack_start(button,False,False)
		return hbox
--- cut ---
I can give the full source if needed.


Can someone help please, or give a URL to a working example.

-- 
Python 2.5.1




More information about the pygtk mailing list