Tkinter: Where are event.state constants?

Randall Hopper aa8vb at yahoo.com
Tue Oct 26 15:02:51 EDT 1999


I have:

  picture.bind( "<ButtonPress-1>"  , click_cb )
  picture.bind( "<ButtonRelease-1>", click_cb )

In click_cb(), event.state is 0 for ButtonPress and 256 for ButtonRelease.

Where are the Tkinter constants for these?  Or how should one distinguish
between a press and release in a callback?

(I want to avoid having a separate callback for each type of event.)

Thanks,

Randall

-- 
Randall Hopper
aa8vb at yahoo.com




More information about the Python-list mailing list