Tkinter Scrolling

D duncanm255 at hotmail.com
Thu Feb 1 14:26:08 EST 2007


Bob Greschke wrote:
> On 2007-02-01 05:35:30 -0700, "D" <duncanm255 at hotmail.com> said:
>
> > I'm sure this is a simple question to the Tkinter experts - I have a
> > very basic Tkinter application that consists of 1 master window and
> > buttons within that window.  My problem is that, I need to be able to
> > scroll (up and down) when I get to the point that the buttons go off
> > the screen.  What's the easiest way to do this?  Thanks in advance.
>
> The super-easiest way is to make the "background" a Text() widget, add
> its scrollbars, then add the buttons and whatever else to it.  Of
> course you are then limited to the 'typewriter layout' of widget
> placement.  The typical way to do it is to make a scrolling canvas and
> pack the buttons and other stuff into an empty Frame() and then pack
> the frame on to the canvas, which I haven't had to do yet.
>
> Bob
Thanks, Bob - have you seen any examples of the latter approach (using
a canvas and frame)?  Sounds rather confusing, but it definitely seems
like the approach I need to take.  Thanks again.




More information about the Python-list mailing list