Actually, that doesn't work. The "clicked" signal doesn't like to work on
widgets and the "button-press-event" signal doesn't like to work either. I
found a suitable work around (not using pygtk), but I figured I'd mention
that this solution doesn't work. For some reason, the "button-press-event"
signal never gets fired so the callback never runs.
Mike
At 03:14 AM 8/12/2005 +0000, Vinay Reddy wrote:
On 8/11/05, Michael D'Ambrosio <[EMAIL PROTECTED]> wrote:
> I want to get the mouse coordinates whenever I click on a widget (in my
> case, it's an embedded mozilla browser). I cannot find the proper class.
> Any direction would be greatly appreciated. Thank you.
>
Do a widget.connect("clicked", callback, callback_data)
and define the callback function:
def callback(widget, event, callback_data):
x, y = event.get_coords()
Also refer to:
http://www.pygtk.org/pygtk2tutorial/sec-TheoryOfSignalsAndCallbacks.html
and http://www.pygtk.org/pygtk2tutorial/sec-Events.html
HTH,
Vinay
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/