> I've created my first applet, ...
> [there are some problems]
Actually, on a second reading, I think I know what
you're talking about.
I suspect that the button is swallowing mouse press
events, and so right-click goes to the button rather
than the applet (which would bring up the menu).
What you want is for left-mouse-click to go the
button, but right-mouse-click to propagate.
The relevant code (from my applet I referred to
previously, replacing "button" with "menubar")
would look like:
-----------------------
# when constructing GUI elements
btn.connect("button-press-event", on_btn_click)
# a separate method definition
def on_btn_click(widget, event):
# allow Middle- and Right-Mouse-Button to
# go through to the applet window
# 1 stands for Left-Mouse-Button
if event.button != 1:
widget.emit_stop_by_name("button-press-event")
return gtk.FALSE
-----------------------
Nigel.
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/