creating a scrolling bar on the side with data already there

  python, scroll, tkinter, tkinter-layout

Ive noticed that the space I have for my window is not enough for all the information I need to put on the screen, Is there a way I can put a scrolling bar in without having to put text such as ‘line 1, line 2, line 3…..’

    def startaudit():
        global screen15
        global ward_entry
        global roomsinsite_entry
        global q1_entry
        global q2_entry
        global q3_entry
        screen15 = Toplevel()
        screen15.geometry("300x250")
        screen15.title("Rooms") 
        ward = StringVar()
        roomsinsite = StringVar()
        q1 = StringVar()
        q2 = StringVar()
        q3 = StringVar()
        Label(screen15, text = "Insert Ward as 'ward xxx':", bg = "LightSkyBlue1", width = "300", height = "2").pack()
        Label(screen15, text = "").pack()
        ward_entry = Entry(screen15, textvariable = ward)
        ward_entry.pack()
        Label(screen15, text = "Insert room name:", bg = "LightSkyBlue1", width = "300", height = "2").pack()
        Label(screen15, text = "").pack()
        roomsinsite_entry = Entry(screen15, textvariable = roomsinsite)
        roomsinsite_entry.pack()
        # generated a questionaire which the user will rank with a 1/0 or x 1-pass 0-fail x- not applicable
        Label(screen15, text = "Please enter details below", bg = "LightSkyBlue1", width = "300", height = "2").pack()
        Label(screen15, text = "").pack()
        Label(screen15, text = "01. Commodes CLEANING").pack()
        q1_entry = Entry(screen15, textvariable = q1)
        q1_entry.pack()
        Label(screen15, text = "02. commodes NURSING").pack()
        q2_entry = Entry(screen15, textvariable = q2)
        q2_entry.pack()
        Label(screen15, text = "03. Bathroom Hoists CLEANING").pack()
        q3_entry = Entry(screen15, textvariable = q3)
        q3_entry.pack()
        Button(screen15, text = "Store Answer Scores", width = "20", height = "1", command = lambda:[insertroom(),storeanswers()]).pack()
        Button(screen15, text = "Calculate average and store score", width = "20", height = "1", command = storeaveragescore).pack()

Source: Python Questions

LEAVE A COMMENT