I'm making a short program where I extract data from a csv file and order them in a Canvas window placed inside the main root window. Of course I put a scrollbar because the list of pretty long.
frameList = Frame(root, width=300, height=300)
frameList.place(x=0, y=315)
canvasWindow = Canvas(frameList, bg='#FFFFFF', width=950, height=400, scrollregion=(0, 0, 150, 60000))
vbar = Scrollbar(frameList, orient=VERTICAL)
vbar.pack(side=RIGHT, fill=Y)
vbar.config(command=canvasWindow.yview)
canvasWindow.config(yscrollcommand=vbar.set)
canvasWindow.bind("<MouseWheel>", lambda event: canvasWindow.yview_scroll(int(-1*(event.delta/120)), "units"))
canvasWindow.bind("<Enter>", lambda event: canvasWindow.yview_scroll(int(-1*(event.delta/120)), "units"))
canvasWindow.pack(side=LEFT, expand=True, fill=BOTH)
I have no problem scrolling it but when the mouse is over labels or buttons that are inside the "CanvasWindow", it doesn't scroll it. Is there a way to include these labels/buttons to the scrolling area?
Thanks a lot for your help