mån 2003-03-03 klockan 19.41 skrev Andrew P. Lentvorski, Jr.:
> Ummmm, I guess I didn't make myself clear.  The code snippet is to show
> how to do a *popup* menu using an ItemFactory.  John Finlay's tutorial
> only shows how to use ItemFactory for menubars.

Save a reference to the ItemFactory in the class (this is very
important)
self.itemf = gtk.ItemFactory(...) 

Then get the menu widget:

self.menubar = self.itemf.get_widget('<main>')

They you can use self.menubar.popup() in the button-press-event
callback.

-- 
Johan Dahlin <[EMAIL PROTECTED]>
Async Open Source

_______________________________________________
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