Pmw.ScrolledText programatically scrolling

Martin Franklin mfranklin1 at gatwick.westerngeco.slb.com
Fri Sep 13 09:45:42 EDT 2002


On Friday 13 Sep 2002 12:04 pm, 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?
>
> Thanks
>
> Joe

Joe,

Try this:-


st.insert('end',stuff)
st.yview_pickplace('end')

where 'st' is a Pmw.ScrolledText instance


Regards
Martin

-- 
### Python Powered Signature
I started writting this email on 
Fri Sep 13 13:44:27 2002





More information about the Python-list mailing list