How to put a scrollbar to a frame?
Nick Perkins
nperkins7 at home.com
Tue Jun 5 13:55:48 EDT 2001
I use the Tkinter Text widget for simple
(often debugging) messages:
class whatever....
init..
self.text = Text(self)
self.text.pack()
def say(self,message):
self.text.insert(END,message)
self.text.see(END)
..It does not have a scrollbar, but automatically
scrolls up when messages reach the bottom.
.. you can also call text.clear() from time to time
"JAY" <lijil at nortelnetworks.com> wrote in message
news:9fip1t$5js$1 at bcarh8ab.ca.nortel.com...
> Hi there,
>
> I am pretty new to python. My python script makes a frame in a widget to
> display some messages (UNIX system),
> it works fine. However, if the message gets too long, the frame will be
> extended and make the whole widget bigger
> than screen.
>
> To solve the problem, I want to put a scrollbar to the frame for the
> messages so that it's size won't change. But I don't
> know how. Could anybody tell me how to do it?
>
> Thank you in advance,
>
> JAY
>
>
More information about the Python-list
mailing list