I want to be able to delete all selected items when I use selectmode=MULTIPLE.I have tried to delete but it only deletes the item that was selected last. Is there any way to delete all of the items.
Thanks
from tkinter import *def abc(): listbox.delete(ACTIVE)def xyz(): z=listbox.get(0, END) print (z)master = Tk()scrollbar = Scrollbar(master,orient=VERTICAL)listbox = Listbox(master, yscrollcommand=scrollbar.set, selectmode=MULTIPLE)scrollbar.config(command=listbox.yview)b = Button(master, text="delete", command=abc)b.pack(side=RIGHT)b2 = Button(master, text="save", command=xyz)b2.pack(side=RIGHT)scrollbar.pack(side= RIGHT, fill=Y)listbox.pack(side=LEFT)for item in ["one", "two", "three", "four", "five"]: listbox.insert(END, item)mainloop()