Pmw.ScrolledText programatically scrolling
Eric Brunel
eric.brunel at pragmadev.com
Fri Sep 13 09:06:24 EDT 2002
Joe Connellan wrote:
> I've got a Pmw.ScrolledText() that I'm using as a log and I've written
> an addToLog() method like so:
>
> def addToLog(self, logString):
> self.logScr.configure(text_state = 'normal')
> self.logScr.insert(END, logString)
> self.logScr.configure(text_state = 'disabled')
>
> I now want it to scroll when I add a line so the user doesn't have to
> constantly scroll down to view the most recent lines.
>
> I can't find any info on doing this with ScrolledText or its text
> component - do I need to reposition the scrollbars for it to scroll?
Adding:
self.logScr.see(END)
should do the trick.
HTH
--
- Eric Brunel <eric.brunel at pragmadev.com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com
More information about the Python-list
mailing list