[Python-bugs-list] Tkinter missing button state symbols (PR#132)
Thu, 18 Nov 1999 14:04:13 -0500
Guido van Rossum:
|> Full_Name: Randall Hopper
|> Version: 1.5.2
|> OS: IRIX 6.5
|> Submission from: ethyl-f.rtpfddi.epa.gov (188.8.131.52)
|> 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.)
|This is not a question for the bugs list.
|Write to email@example.com or use the newsgroup for help. I don't know
|offhand what the answer is to your question; I suspect that the answer
|is in the Tcl/Tk man page for the bind command though.
My fault. I should have rephrased the question into a statement. Tkinter
does not provide symbol defines for event.state values (%s keyword in Tcl).
Tcl doesn't either, but it would be useful if Tkinter did.
This is a small enhancement request rather than a hard bug, but I thought
the submission form was for probably applicable for both.