faqts : Computers : Programming : Languages : Python : Tkinter

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 5 people (100%) answered Yes
Recently 5 of 5 people (100%) answered Yes

Entry

How do I bind a keypress to a Pmw widget without having to use bind_all?

Feb 20th, 2003 03:00
Mickel Grönroos,


Make sure the widget has focus:
widget.bind("<KeyPress>", self.doSomething)
widget.bind("<Button>", (lambda e=1: self.focus_set()))