views:

37

answers:

2

Using Python and PyGTK I've got a GtkMenu with various GtkCheckMenuItems in it. When the user clicks one of the checkboxes the menu closes. I'd like for the user to be able to check a series of checkboxes without the menu closing each time.

I've looked at using the activate callback to show the menu but this doesn't seem to work. Any suggestions?

A: 

Try digging into source and it's documentation. I have found this to be the easiest way and best shortcut.

iElectric
+2  A: 

I see the problem here, the "activate" signal does not allow you to return a boolean as to whether you wish the signal to propagate onwards. It sounds like you may need to poke around the gtk.CheckMenuItem internals, fire a signal that "reopens" the menu at the current position to be processed immediately after the "activate" signal has closed down the menu, or try the mailing list.

It's probably worth noting this is more of a GTK+ question than a PyGTK, as I believe the PyGTK API reflects the GTK+ one closely on this issue.

Matt Joiner
Thanks. I'll go have more of a poke.
davedavedave