Hi Behseini , Thus spoketh Behseini <suf...@gmail.com> unto us on Wed, 2 Mar 2011 17:23:59 -0800 (PST):
(...) > > can you please take a look at this code and let me know how I can call > one of the method by selecting the item from the list? You will want to have a look at the Listbox widget's <<ListboxSelect>>' virtual event, which is generated each time the selection changes (see the listbox Tk man page for details). A brief usage example: ######################################### from Tkinter import * root = Tk() l = Listbox(root, selectmode='multiple') l.pack() def on_select(event): print event.widget.curselection() l.bind('<<ListboxSelect>>', on_select) for i in range(10): l.insert('end', 'Item %d' % i) root.mainloop() ######################################### I hope this helps Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. No one may kill a man. Not for any purpose. It cannot be condoned. -- Kirk, "Spock's Brain", stardate 5431.6 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss