Dear all,

how can I keep the listbox selection persistent when user selects something in 
the entry?
In the following example, the rows 0 to 10 are selected in the listbox
If you click and select something in the entry box the selection is lost
Is there an option to avoid this behaviour?

Best Regards
Vasilis

from Tkinter import *
tk = Tk()

listbox = Listbox(tk, selectmode=EXTENDED, exportselection=True)
listbox.pack(fill=BOTH, expand=YES)
for i in range(100): listbox.insert(END,"line %d"%(i))
listbox.selection_set(0,10)

entry = Entry(tk)
entry.pack(side=BOTTOM, fill=X)
entry.insert(0,"Hello world")
tk.mainloop()
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to