On Mon, Feb 17, 2003 at 12:48:17PM +0100, Andreas Kostyrka wrote:
> I'm trying to fix the Kiwi Clist enable_context_menu functionality, and I'm 
> wondering:
> Based upon the Gtk1.2 documentation, and the pygtk0 source, the correct 
> calling sequence should be something like:
>         self._edit_menu.popup(None,None,None,event.button,event.time)
> Interestingly this doesn't seem to work. It doesn't generate any error 
> messages but it doesn't show any popup window either.
> 
> My Menu created something like this:
>         class MyMenu(gtk.GtkMenu):
>             def __init__(self):
>                 gtk.GtkMenu.__init__(self)
>             def set_selection(self,*args):
>                 print "SELECTION:",args
>                 
>         myMenu=MyMenu()
>         myMenu.append(gtk.GtkMenuItem("Karteikarte"))
>         myMenu.append(gtk.GtkMenuItem("Stammdaten"))
>         myMenu.append(gtk.GtkMenuItem("L�schen"))
>         return myMenu
> It doesn't work either with myMenu=gtk.GtkMenu()

Documentation bug :-( Your CList popup menu needs to inherit from
Menus.PopupMenu. I could remove this limitation, but I find it silly to
need to use event.button and event.time in the same callback. Anyway,
have a look at tests/test_CList.py which has a very simple example.

Does that work for you?

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
_______________________________________________
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