Tkinter: creating a scrolling canvas that contains widows (Frame widgets)

Kevin Cazabon kcazabon at
Mon Feb 21 02:02:56 CET 2000

I've been trying to create a class that I can use to place Frame() widgets
into a scrolling 'container'.

Basically, I want a master "Frame" that has a Y scroll bar (and maybe X as
well).  In this frame, I want to be able to add sub-frames (any number).  If
all of these frames won't fit, I want to be able to scroll the master Frame
as necessary.

The only suitable Tkinter class for the Master I can find is the Canvas
widget.  I have no problem creating this, and adding windows to it using
canvas.create_window(x,y, window=mywidget), but have had a heck of a time
getting it to scroll properly, especially when the user resizes the overall
master frame.

This may sound complicated, but it really isn't... just the implementation
might be!

Any suggestions, or if you can point me to an exapmle that might help (like
the ScrolledText widget, which is very similar to what I need, kindof...), I
would greatly appreciate it.

Kevin Cazabon
kcazabon at

More information about the Python-list mailing list