I'm trying to make 100 Entry widgets. It should be scrolled using a vertical scroll bar. since frame doesn't have scroll bar option, I used canvas. But when I add Entry widgets scroll bar not working. Can someone help me out what mistake I made.
MY CODE:
from tkinter import *
root=Tk()
frame=Frame(root,width=300,height=300)
frame.grid(row=0,column=0)
canvas=Canvas(frame,width=300,height=300,scrollregion=(0,0,500,500))
for _ in range(100):
Entry(canvas).pack()
vbar=Scrollbar(frame,orient=VERTICAL)
vbar.pack(side=RIGHT,fill=Y)
vbar.config(command=canvas.yview)
canvas.config(yscrollcommand=vbar.set)
canvas.pack(side=LEFT,expand=True,fill=BOTH)
root.mainloop()