[Tutor] binding problem

Alan Gauld alan.gauld at btinternet.com
Thu Nov 3 09:23:43 CET 2011

On 03/11/11 04:46, Chris Hare wrote:
> I have a Listbox defined
> self.list = Listbox(self.frame)
> What I want to do is when the user either single clicks, double clicks, presses tab or return, move the focus to the specified field
>                  self.list.bind("<Button-1>", self.login_userid.focus_set())

Don't call the function, just pass its name:

self.list.bind("<Button-1>", self.login_userid.focus_set)


Alan G
Author of the Learn to Program web site

More information about the Tutor mailing list