0

I am a python beginner. I spent a couple of hours trying to add a scroll bar to my tkinter frame and I can't seem to make it work. Tried many suggested solutions from the internet but all of them failed.

This is the cut down version of my codes. Could anyone help please?

from tkinter import *
from tkinter import messagebox as mb
from tkcalendar import DateEntry
import tkinter as tk
import datetime
import csv

root = tk.Tk()
root.geometry('520x900+900+85')
root.title("Location Sheet")

# Widget frame for scrollbar
widget_frame = Frame(root, bg = "#FFFFFF")
widget_frame.pack(side = "right", fill = Y)

#create a scrollbar for widget frame
scroll_widget = Scrollbar(widget_frame, orient=VERTICAL)
scroll_widget.pack(side = 'right', fill = Y)
#widget_frame.config(yscrollcommand = scroll_widget.set)
#scroll_widget.config(command = widget_frame.yview)
#scroll_widget.config(command = widget_frame.yview)

root.mainloop()

Attached image of where I would like to implement it in the final product. Intended final product where the scrollbar should be in

  • For future reference, cutting down your code for questions here should include removing unnecessary `import`s. – martineau May 07 '22 at 08:24

0 Answers0