Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #42657

Re: Tkinter

References <CAHq3d9C_ruMdbhc2vWZJCRDh=o4yQhEm33r=CMp9rbzqGYdx6g@mail.gmail.com> <CAEk9e3o=CzSeHD902DmMiVgXY0ZK1S4wLnDY0DOQw1Ab03QKXA@mail.gmail.com> <CAHq3d9Cfudq1RpvAnuGEjr4PWjuqqaskqerDHa_OLSYnJhb6dw@mail.gmail.com> <CAEk9e3p097wC0dHagQe_=9CTYkYVyH-TMmLZ-Lf7=WRMUf5_DQ@mail.gmail.com> <CAHq3d9BRdS7-n_8yGvMGvx=C1NPeGfhk154g0AYsWBCr+DkAiQ@mail.gmail.com>
Date 2013-04-03 08:05 -0400
Subject Re: Tkinter
From Jason Swails <jason.swails@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.51.1364990763.3114.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, Apr 2, 2013 at 10:04 PM, Renato Barbosa Pim Pereira <
renato.barbosa.pim.pereira@gmail.com> wrote:

> Thanks for the advices, I need now one scrollbar to roll under screen, I
> created the scrollbar but cant roll, please help me on this.
>
> http://pastebin.com/L6XWY6cm
>


You need to bind your scrollbar to a particular action.  It does not roll
because you never told it what 'rolling' should do.  That said, you need to
bind your scrollbar command to a widget that actually supports scrolling.
 According to [1], your options are the Listbox, Text, Canvas, and Entry
widgets.  What that means is that you will need to replace your Frame
widget with a Canvas widget (or embed a Canvas in your Frame, although with
your existing code that latter approach does not serve much purpose).  Then
bind your scrollbar command to the xview method of your Canvas instance (or
the yview method of your Canvas instance if you want to scroll vertically).

HTH,
Jason

[1] http://effbot.org/zone/tkinter-scrollbar-patterns.htm

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Tkinter Jason Swails <jason.swails@gmail.com> - 2013-04-03 08:05 -0400

csiph-web