I have created tkinter window and created a frame and in that frame, I have created a canvas and also linked scrollbar to it. In canvas I have created 3 labels one below other.
Now, when I try to scroll, the slider just moves and the label doesn't move.
Why is this happening? I am a new to python and tkinter can you guys please tell where am I going wrong or am I missing some code?
Here you can see that I am trying to scroll but only the slider is moving but not the label, that is, the content inside it.
So this is my code:
def news_frame():
my_frame=Frame(mw)
my_frame.pack()
my_scrollbar=Scrollbar(my_frame,orient=VERTICAL)
my_scrollbar.pack(side=RIGHT,fill=Y)
my_canvas=Canvas(my_frame,width=1980,height=1200,scrollregion=
(0,0,2000,1500),yscrollcommand=my_scrollbar.set)
my_canvas.pack()
label1=Label(my_canvas,text=title)
label1.place(x=500,y=20)
my_scrollbar.config(command=my_canvas.yview)
newslblframe=Label(my_canvas,bg="white",bd=5,relief=RAISED)
newslblframe.place(x=20,y=45,width=1320,height=245)
newslblframe2=Label(my_canvas,bg="white",text=title,bd=5,relief=RAISED)
newslblframe2.place(x=20,y=300,width=1320,height=245)
newslblframe2=Label(my_canvas,bg="white",text=title,bd=5,relief=RAISED)
newslblframe2.place(x=20,y=553,width=1320,height=245)