import tkinter as tk

def _on_mousewheel(self, event):
    self.canvas.yview_scroll(-1*(event.delta/120), "units")

def populate(frame):
    '''Put in some fake data'''
    for row in range(100):
        tk.Label(frame, text="%s" % row, width=3, borderwidth="1", 
                 relief="solid").grid(row=row, column=0)
        t="this is the second column for row %s" %row
        tk.Label(frame, text=t).grid(row=row, column=1)

def onFrameConfigure(canvas):
    '''Reset the scroll region to encompass the inner frame'''
    canvas.configure(scrollregion=canvas.bbox("all"))

root = tk.Tk()
canvas = tk.Canvas(root, borderwidth=0, background="#ffffff")
frame = tk.Frame(canvas, background="#ffffff")
vsb = tk.Scrollbar(root, orient="vertical", command=canvas.yview)
canvas.configure(yscrollcommand=vsb.set)

vsb.pack(side="right", fill="y")
canvas.pack(side="left", fill="both", expand=True)
canvas.create_window((4,4), window=frame, anchor="nw")

frame.bind("<Configure>", lambda event, canvas=canvas: onFrameConfigure(canvas))

populate(frame)

root.bind_all("<MouseWheel>", self._on_mousewheel)

root.mainloop()
14d59c41b6df791d1dd16a202b32368b4dc38fd7
<mask token>


def _on_mousewheel(self, event):
    self.canvas.yview_scroll(-1 * (event.delta / 120), 'units')


<mask token>


def onFrameConfigure(canvas):
    """Reset the scroll region to encompass the inner frame"""
    canvas.configure(scrollregion=canvas.bbox('all'))


<mask token>

<mask token>


def _on_mousewheel(self, event):
    self.canvas.yview_scroll(-1 * (event.delta / 120), 'units')


def populate(frame):
    """Put in some fake data"""
    for row in range(100):
        tk.Label(frame, text='%s' % row, width=3, borderwidth='1', relief=
            'solid').grid(row=row, column=0)
        t = 'this is the second column for row %s' % row
        tk.Label(frame, text=t).grid(row=row, column=1)


def onFrameConfigure(canvas):
    """Reset the scroll region to encompass the inner frame"""
    canvas.configure(scrollregion=canvas.bbox('all'))


<mask token>
canvas.configure(yscrollcommand=vsb.set)
vsb.pack(side='right', fill='y')
canvas.pack(side='left', fill='both', expand=True)
canvas.create_window((4, 4), window=frame, anchor='nw')
frame.bind('<Configure>', lambda event, canvas=canvas: onFrameConfigure(canvas)
    )
populate(frame)
root.bind_all('<MouseWheel>', self._on_mousewheel)
root.mainloop()

<mask token>


def _on_mousewheel(self, event):
    self.canvas.yview_scroll(-1 * (event.delta / 120), 'units')


def populate(frame):
    """Put in some fake data"""
    for row in range(100):
        tk.Label(frame, text='%s' % row, width=3, borderwidth='1', relief=
            'solid').grid(row=row, column=0)
        t = 'this is the second column for row %s' % row
        tk.Label(frame, text=t).grid(row=row, column=1)


def onFrameConfigure(canvas):
    """Reset the scroll region to encompass the inner frame"""
    canvas.configure(scrollregion=canvas.bbox('all'))


root = tk.Tk()
canvas = tk.Canvas(root, borderwidth=0, background='#ffffff')
frame = tk.Frame(canvas, background='#ffffff')
vsb = tk.Scrollbar(root, orient='vertical', command=canvas.yview)
canvas.configure(yscrollcommand=vsb.set)
vsb.pack(side='right', fill='y')
canvas.pack(side='left', fill='both', expand=True)
canvas.create_window((4, 4), window=frame, anchor='nw')
frame.bind('<Configure>', lambda event, canvas=canvas: onFrameConfigure(canvas)
    )
populate(frame)
root.bind_all('<MouseWheel>', self._on_mousewheel)
root.mainloop()

import tkinter as tk


def _on_mousewheel(self, event):
    self.canvas.yview_scroll(-1 * (event.delta / 120), 'units')


def populate(frame):
    """Put in some fake data"""
    for row in range(100):
        tk.Label(frame, text='%s' % row, width=3, borderwidth='1', relief=
            'solid').grid(row=row, column=0)
        t = 'this is the second column for row %s' % row
        tk.Label(frame, text=t).grid(row=row, column=1)


def onFrameConfigure(canvas):
    """Reset the scroll region to encompass the inner frame"""
    canvas.configure(scrollregion=canvas.bbox('all'))


root = tk.Tk()
canvas = tk.Canvas(root, borderwidth=0, background='#ffffff')
frame = tk.Frame(canvas, background='#ffffff')
vsb = tk.Scrollbar(root, orient='vertical', command=canvas.yview)
canvas.configure(yscrollcommand=vsb.set)
vsb.pack(side='right', fill='y')
canvas.pack(side='left', fill='both', expand=True)
canvas.create_window((4, 4), window=frame, anchor='nw')
frame.bind('<Configure>', lambda event, canvas=canvas: onFrameConfigure(canvas)
    )
populate(frame)
root.bind_all('<MouseWheel>', self._on_mousewheel)
root.mainloop()

import tkinter as tk

def _on_mousewheel(self, event):
    self.canvas.yview_scroll(-1*(event.delta/120), "units")

def populate(frame):
    '''Put in some fake data'''
    for row in range(100):
        tk.Label(frame, text="%s" % row, width=3, borderwidth="1", 
                 relief="solid").grid(row=row, column=0)
        t="this is the second column for row %s" %row
        tk.Label(frame, text=t).grid(row=row, column=1)

def onFrameConfigure(canvas):
    '''Reset the scroll region to encompass the inner frame'''
    canvas.configure(scrollregion=canvas.bbox("all"))

root = tk.Tk()
canvas = tk.Canvas(root, borderwidth=0, background="#ffffff")
frame = tk.Frame(canvas, background="#ffffff")
vsb = tk.Scrollbar(root, orient="vertical", command=canvas.yview)
canvas.configure(yscrollcommand=vsb.set)

vsb.pack(side="right", fill="y")
canvas.pack(side="left", fill="both", expand=True)
canvas.create_window((4,4), window=frame, anchor="nw")

frame.bind("<Configure>", lambda event, canvas=canvas: onFrameConfigure(canvas))

populate(frame)

root.bind_all("<MouseWheel>", self._on_mousewheel)

root.mainloop()