Add item to the end of ListBox : ListBox « Tkinker « Python Tutorial






Add item to the end of ListBox
from Tkinter import *
root = Tk()
mylistbox = Listbox(root)
mylistbox.pack()
mylistbox.delete(0, END) 
mylistbox.insert(END, "This is the row number 1")
for number in range(2,41):
    mylistbox.insert(END, "This is the row number " + str(number))
root.mainloop()








18.19.ListBox
18.19.1.Add item to ListBoxAdd item to ListBox
18.19.2.ListBox with scroll barListBox with scroll bar
18.19.3.Creating a multiple selection list.Creating a multiple selection list.
18.19.4.Add item to the end of ListBoxAdd item to the end of ListBox
18.19.5.Remove the selected itemsRemove the selected items
18.19.6.Scrolled listScrolled list