Look up the description of the GdkEvent type in the description.py file
included with pygtk and gnome-python.  Specifically, for button events you
want to look at its button attribute (event.button == 1 for first mouse
button, etc).

James.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Mon, 20 Dec 1999, Hassan Aurag wrote:

>  Hi,
> 
> I am doing in a canvas-derived class something like this:
> 
> self.connect("button_press_event", self.handle_events)
> 
> where handler is:
> 
>     def handle_events(self, widget, vars):
>         print type(vars)
>         return FALSE
> 
> I hoped this way to get more info on how to use that signal.
> 
> Now my question:
> 
> How in the heavens would I know from vars, which in my case happen to 
> be:
> <type 'GdkEvent'>
> which mouse button was pressed!
> 
> All three button presses give same type!!!!
> 
> 
> Thanks and sorry if this is dumb!
> 
> 
> 
> 
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
> 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to