From: Tony Houghton <h@re...> - 2007-12-04 13:13:24
Lennon Cook <lennon@...> wrote:
> I am writing a panel app which consists only of a single combo box. Is
> there a way to attach a menu to it?
> Attempting to attach the menu to the combobox itself, or to an
> eventbox containing it, gives the following error:
> AttributeError: 'gtk.EventBox' object has no attribute
> Attaching it to the rox.applet.Applet doesn't give any error, but it
> simply fails to work - right-clicking does not produce the menu.
> Is there any way to get this to work?
Have you tried connecting a signal handler for gtk.gdk.BUTTON_PRESS to
the combo box? Then you should be able to open your menu on a right
click and return True, and return False for other events to have them be
handled by gtk to make it behave properly as a combo box.
TH * http://www.realh.co.uk
Tony Houghton <h@...> wrote:
> Have you tried connecting a signal handler for gtk.gdk.BUTTON_PRESS to
> the combo box?
Attaching it to the combobox doesn't work; the only thing I've found so
far that does is to attach it to an event box in front of the combo
box. But this blocks the normal action of the combobox, even when I try
forwarding the event with:
Lennon Victor Cook
"He who receives an idea from me receives without lessening, as he who
lights his candle at mine receives light without darkening" -- Thomas
Get latest updates about Open Source Projects, Conferences and News.