tkinter.Listbox.grid


Definition
Insert the listbox  in grid.

Syntax
Listbox.grid

Examples
The Listbox is created through for loop.
from tkinter import*
 
master=Tk()
master.title("Listbox")

listbox=Listbox(master, background="Blue", fg="white",selectbackground="Red",highlightcolor="Red")
listbox.grid(row=1, column=1)

for x in range(1, 10):

    listbox.insert(END, x)

master.mainloop()




Comments