[pygtk] Unsure which module to import
Chris Irish
chris.irish at libertydistribution.com
Thu Jul 15 03:51:53 WST 2004
Chris Irish wrote:
> Hi all, I'm reading in the gtk FAX about how to test for multiple
> button clicks in a callback method. but I'm unsure which module I need
> to import to be able to use the gdk constants. For example if I have
> the code snippet in my callback:
>
> if event.type == GDK._2BUTTON_PRESS:
> print 'double click'
>
> I'm already importing gtk, what am I missing. Some advice would be
> greatly appreciated. Chris
Ah it seems I found the answer myself. In the FAQs section 5.4, when
the example is testing for single, double, or triple clicks it is shown
that you test the event type like above. However, it's not
GDK._2BUTTON_PRESS, it seems to work correctly if you test against
gtk.gdk._2BUTTON_PRESS. Maybe this is implied or something, or maybe
it's just a typo in the FAQs. Hopefully this helps anyone else with the
same question/problem. :)
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
More information about the pygtk
mailing list