title: How to add a scrollbar to tkinter application?
body: <p>I am trying to make an simple database based software for my personal report generation work. But the my GUI has more length. So I need to add srollbar I tried to use canvas and frame and previous tutorials. But mostly it is working for <code>Listbox</code> but not for whole application window.</p>
  
  <p>My code is given below: </p>
  
  <pre><code>from tkinter import *
  from tkinter import ttk
  from tkinter import messagebox
  
  window = Tk()
  scroll = Scrollbar(window)
  scroll.grid(column = 5, row = 0, rowspan = 20)
  window.wm_title('Water Quality Testing Laboratory')
  
  frame1 = Canvas(window)
  frame1.grid(column = 0, row = 0)
  # Headings
  
  leb1 = Label(frame1, text = "Water Quality Testing Laboratory", fg = 'black')
  leb1.grid(row = 0, column = 0, sticky = W, padx = 20 , columnspan = 2)
  
  leb2 = Label(frame1, text = "Water Knowledge Centre (WKC)", fg = 'black')
  leb2.grid(row = 1, column = 0, sticky = W, padx = 20 , columnspan = 2)
  
  leb3 = Label(frame1, text = "The DHAN Academy (TDA), Madurai", fg = 'black')
  leb3.grid(row = 3, column = 0, sticky = W, padx = 20 ,columnspan = 2 )
  
  leb4 = Label(frame1, text = "TEST ANALYSIS REPORT", fg = 'black', bg = 'grey', font = 32 )
  leb4.grid(row = 4, column = 0, ipady = 10, pady = 10,  columnspan = 5, sticky= EW ,  )
  
  
  leb5 = Label(frame1, text = 'tda logo')
  leb5.grid(row = 1, column = 4, padx = 20  )
  
  # Sample Details
  
  leb6 = Label(frame1, text = 'Customer Details:')
  leb6.grid(column = 0, row = 6, sticky = E, padx = 20)
  entry_customer = Entry(frame1)
  entry_customer.grid(column = 1, row = 6, columnspan = 4, ipadx = 250)
  
  leb7 = Label(frame1, text = 'Sample Number:')
  leb7.grid(column = 0, row = 7, sticky = E, padx = 20)
  entry_sampleNumber = Entry(frame1)
  entry_sampleNumber.grid(column = 1, row = 7)
  
  leb8 = Label(frame1, text = 'Sample Drawn By:')
  leb8.grid(column = 3, row = 7, sticky = E)
  entry_sampleDrawn = Entry(frame1)
  entry_sampleDrawn.grid(column = 4, row = 7)
  
  leb9 = Label(frame1, text = 'Sample Drawn Date:')
  leb9.grid(column = 0, row = 8, sticky = E, padx = 20)
  entry_sampleDrawnDate = Entry(frame1)
  entry_sampleDrawnDate.grid(column = 1, row = 8)
  
  leb10 = Label(frame1, text = 'Sample Reached Lab on:')
  leb10.grid(column = 3, row = 8, sticky = E)
  entry_sampleReached = Entry(frame1)
  entry_sampleReached.grid(column = 4, row = 8)
  
  leb11 = Label(frame1, text = 'Test Start Date:')
  leb11.grid(column = 0, row = 9, sticky = E, padx = 20)
  entry_testStart = Entry(frame1)
  entry_testStart.grid(column = 1, row = 9)
  
  leb12 = Label(frame1, text = 'Test End Date:')
  leb12.grid(column = 3, row = 9, sticky = E)
  entry_testEnd = Entry(frame1)
  entry_testEnd.grid(column = 4, row = 9)
  
  leb13 = Label(frame1, text = 'Sample Reference:')
  leb13.grid(column = 0, row = 10, padx =20, sticky = E)
  entry_sampleReference = Entry(frame1)
  entry_sampleReference.grid(column = 1, row = 10, columnspan = 4, ipadx = 250)
  
  
  ## Test Results
  
  leb14 = Label(frame1, text = '1. Physical Parameters')
  leb14.grid(column = 0, row = 11, pady = 10)
  
  leb15 = Label(frame1, text = 'Sr. No.', bg = 'grey')
  leb15.grid(column = 0, row = 12, sticky = NSEW)
  
  leb16 = Label(frame1, text= 'Parameters', bg = 'grey')
  leb16.grid(column = 1, row = 12, sticky = NSEW)
  
  leb17 = Label(frame1, text= 'Acceptable Limit as per BIS', wraplength = 150, bg = 'grey' )
  leb17.grid(column = 2, row = 12, sticky = NSEW)
  
  leb18 = Label(frame1, text= 'Permissible Limit as per BIS', wraplength = 150, bg = 'grey' )
  leb18.grid(column = 3, row = 12, sticky = NSEW)
  
  leb19 = Label(frame1, text = 'Results',bg = 'grey')
  leb19.grid(column = 4, row = 12, sticky = NSEW)
  
  # Physical Parameters
  leb20 = Label(frame1, text = '1')
  leb20.grid(column = 0, row = 13)
  
  # Appearance
  leb21 = Label(frame1, text = 'Appearance')
  leb21.grid(column = 1, row = 13, sticky = W )
  
  leb22 = Label(frame1, text = '-')
  leb22.grid(column = 2, row = 13)
  
  leb23 = Label(frame1, text = '')
  leb23.grid(column = 3, row = 13)
  
  entry_appearance = Entry(frame1)
  entry_appearance.grid(column = 4, row = 13)
  
  # Colour
  leb24 = Label(frame1, text = '2')
  leb24.grid(column = 0, row = 14)
  
  leb25 = Label(frame1, text = 'Colour')
  leb25.grid(column = 1, row = 14, sticky = W )
  
  leb26 = Label(frame1, text = '-')
  leb26.grid(column = 2, row = 14 )
  
  leb27 = Label(frame1, text = '')
  leb27.grid(column = 3, row = 14, sticky = W )
  
  entry_colour = Entry(frame1)
  entry_colour.grid(column = 4, row = 14)
  
  # Odour
  leb28 = Label(frame1, text = '3')
  leb28.grid(column = 0, row = 15)
  
  leb29 = Label(frame1, text = 'Odour')
  leb29.grid(column = 1, row = 15, sticky = W )
  
  leb30 = Label(frame1, text = 'Unobjectionable')
  leb30.grid(column = 2, row = 15, sticky = W )
  
  leb31 = Label(frame1, text = 'Unobjectionable')
  leb31.grid(column = 3, row = 15, sticky = W )
  
  entry_odour = Entry(frame1)
  entry_odour.grid(column = 4, row = 15)
  
  # Turbidity NTU
  leb32 = Label(frame1, text = '4')
  leb32.grid(column = 0, row = 16)
  
  leb33 = Label(frame1, text = 'Turbidity NTU')
  leb33.grid(column = 1, row = 16, sticky = W )
  
  leb34 = Label(frame1, text = '1')
  leb34.grid(column = 2, row = 16 )
  
  leb35 = Label(frame1, text = '5')
  leb35.grid(column = 3, row = 16)
  
  entry_turbidity = Entry(frame1)
  entry_turbidity.grid(column = 4, row = 16)
  
  # Electrical Conductivity (EC)
  leb36 = Label(frame1, text = '5')
  leb36.grid(column = 0, row = 17)
  
  leb37 = Label(frame1, text = 'Electrical Conductivity (EC)')
  leb37.grid(column = 1, row = 17, sticky = W )
  
  leb38 = Label(frame1, text = '-')
  leb38.grid(column = 2, row = 17)
  
  leb39 = Label(frame1, text = '')
  leb39.grid(column = 3, row = 17, sticky = W )
  
  entry_electricalConductivity = Entry(frame1)
  entry_electricalConductivity.grid(column = 4, row = 17)
  
  # Total Dissolved Solids (TDS)
  leb40 = Label(frame1, text = '6')
  leb40.grid(column = 0, row = 18)
  
  leb41 = Label(frame1, text = 'Total Dissolved Solids (TDS)')
  leb41.grid(column = 1, row = 18, sticky = W )
  
  leb42 = Label(frame1, text = '500')
  leb42.grid(column = 2, row = 18)
  
  leb43 = Label(frame1, text = '2000')
  leb43.grid(column = 3, row = 18)
  
  entry_electricalConductivity = Entry(frame1)
  entry_electricalConductivity.grid(column = 4, row = 18)
  
  # Chemical Parameters
  leb44 = Label(frame1, text = '2. Chemical Parameters')
  leb44.grid(column = 0, row = 19, pady = 10)
  
  # Headers
  leb45 = Label(frame1, text = 'Sr. No.', bg = 'grey')
  leb45.grid(column = 0, row = 20, sticky = NSEW)
  
  leb46 = Label(frame1, text= 'Parameters', bg = 'grey')
  leb46.grid(column = 1, row = 20, sticky = NSEW)
  
  leb47 = Label(frame1, text= 'Acceptable Limit as per BIS', wraplength = 150, bg = 'grey' )
  leb47.grid(column = 2, row = 20, sticky = NSEW)
  
  leb48 = Label(frame1, text= 'Permissible Limit as per BIS', wraplength = 150, bg = 'grey' )
  leb48.grid(column = 3, row = 20, sticky = NSEW)
  
  leb49 = Label(frame1, text = 'Results',bg = 'grey')
  leb49.grid(column = 4, row = 20, sticky = NSEW)
  
  # pH
  leb50 = Label(frame1, text = '1')
  leb50.grid(column = 0, row = 21)
  
  leb51 = Label(frame1, text = 'pH')
  leb51.grid(column = 1, row = 21, sticky = W )
  
  leb52 = Label(frame1, text = '6.5 - 8.5')
  leb52.grid(column = 2, row = 21)
  
  leb53 = Label(frame1, text = '6.5 - 8.5')
  leb53.grid(column = 3, row = 21)
  
  entry_ph = Entry(frame1)
  entry_ph.grid(column = 4, row = 21)
  
  # PH Alkalinity as Caco3
  leb54 = Label(frame1, text = '2')
  leb54.grid(column = 0, row = 22)
  
  leb55 = Label(frame1, text = 'PH Alkalinity as Caco3')
  leb55.grid(column = 1, row = 22, sticky = W )
  
  leb56 = Label(frame1, text = '-')
  leb56.grid(column = 2, row = 22)
  
  leb57 = Label(frame1, text = '-')
  leb57.grid(column = 3, row = 22)
  
  entry_phAlkalinity = Entry(frame1)
  entry_phAlkalinity.grid(column = 4, row = 22)
  
  # Total Alkalinity as CaCO3
  leb58 = Label(frame1, text = '3')
  leb58.grid(column = 0, row = 23)
  
  leb59 = Label(frame1, text = 'Total Alkalinity as CaCO3')
  leb59.grid(column = 1, row = 23, sticky = W )
  
  leb60 = Label(frame1, text = '200')
  leb60.grid(column = 2, row = 23)
  
  leb61 = Label(frame1, text = '600')
  leb61.grid(column = 3, row = 23)
  
  entry_totalAlkalinity = Entry(frame1)
  entry_totalAlkalinity.grid(column = 4, row = 23)
  
  # Total Hardness as CaCO3
  leb62 = Label(frame1, text = '4')
  leb62.grid(column = 0, row = 24)
  
  leb63 = Label(frame1, text = 'Total Hardness as CaCO3')
  leb63.grid(column = 1, row = 24, sticky = W )
  
  leb64 = Label(frame1, text = '200')
  leb64.grid(column = 2, row = 24)
  
  leb65 = Label(frame1, text = '600')
  leb65.grid(column = 3, row = 24)
  
  entry_totalHardness = Entry(frame1)
  entry_totalHardness.grid(column = 4, row = 24)
  
  # Calcium as Ca
  leb66 = Label(frame1, text = '5')
  leb66.grid(column = 0, row = 25)
  
  leb67 = Label(frame1, text = 'Calcium as Ca')
  leb67.grid(column = 1, row = 25, sticky = W )
  
  leb68 = Label(frame1, text = '75')
  leb68.grid(column = 2, row = 25)
  
  leb69 = Label(frame1, text = '100')
  leb69.grid(column = 3, row = 25)
  
  entry_ca = Entry(frame1)
  entry_ca.grid(column = 4, row = 25)
  
  # Magnesium as Mg
  leb70 = Label(frame1, text = '6')
  leb70.grid(column = 0, row = 26)
  
  leb71 = Label(frame1, text = 'Magnesium as Mg')
  leb71.grid(column = 1, row = 26, sticky = W )
  
  leb72 = Label(frame1, text = '30')
  leb72.grid(column = 2, row = 26)
  
  leb73 = Label(frame1, text = '150')
  leb73.grid(column = 3, row = 26)
  
  entry_mg = Entry(frame1)
  entry_mg.grid(column = 4, row = 26)
  
  # Total iron as Fe
  leb74 = Label(frame1, text = '7')
  leb74.grid(column = 0, row = 27)
  
  leb75 = Label(frame1, text = 'Total iron as Fe')
  leb75.grid(column = 1, row = 27, sticky = W )
  
  leb76 = Label(frame1, text = '0.1')
  leb76.grid(column = 2, row = 27)
  
  leb77 = Label(frame1, text = '1.0')
  leb77.grid(column = 3, row = 27)
  
  entry_fe = Entry(frame1)
  entry_fe.grid(column = 4, row = 27)
  
  # Sodium as Na
  leb78 = Label(frame1, text = '7')
  leb74.grid(column = 0, row = 27)
  
  leb75 = Label(frame1, text = 'Total iron as Fe')
  leb75.grid(column = 1, row = 27, sticky = W )
  
  leb76 = Label(frame1, text = '0.1')
  leb76.grid(column = 2, row = 27)
  
  leb77 = Label(frame1, text = '1.0')
  leb77.grid(column = 3, row = 27)
  
  entry_fe = Entry(frame1)
  entry_fe.grid(column = 4, row = 27)
  window.mainloop()
  </code></pre>