[Tutor] event binding

rickp@telocity.com rickp@telocity.com
Wed, 17 Jan 2001 19:31:19 -0500


There must be something I'm missing about event binding.

What I would really like is to know whenever an Entry widget loses focus
but I'll settle for trapping the <Tab> or <Return>.

I can bind <Button-1> successfully but the same statement using <Tab> or
<Return> does nothing. 

	e_wid = Entry(win)
	e_wid.bind('<Tab>',got_event)           #doesn't work
	e_wid.bind('<Button-1>',got_event)      #this works

	def got_event(ev):
		print "got one!"

-- 
"I'm not interested in running for President.  I'm not even interested in
_being_ President.  I'm interested in living in a free society.  And I don't
want it to happen just before I die."
        --- Harry Browne
		   Rick Pasotto email: rickp@telocity.com