[Tkinter-discuss] Passing arguments to command in button.bind

Sorin Schwimmer sxn02 at yahoo.com
Wed Jul 29 17:06:25 CEST 2009


lambda is your friend:

optiondict[option].bind("<Button>", lambda t='this is a string i want to pass':
self.newdestination(t))

HTH
SxN


      __________________________________________________________________
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail.  Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca


More information about the Tkinter-discuss mailing list