[Tkinter-discuss] Scrollbar maybe not setting right on a text widget

Alexnb alexnbryan at gmail.com
Wed Aug 20 00:01:30 CEST 2008


The reason I say "maybe" is because I am not sure if that is what is
happening. 

What happens is that the textbox will fill up (with info the program puts
in, not the user) and the text widget will be at the top, like you will be
looking at the begining of the textbox, but the scrollbar starts at the
bottom of the track. It thinks it is at the bottom, but if you press the
down arrow, it resets and figures it out. I am wondering if I forgot code or
put it out of order?

Oh, and I am using a mac with leopard. 

Here is code:

        self.scrollbar = Scrollbar(self.textFrameBuffer) 
        self.scrollbar.pack(side=RIGHT, fill=Y)
        

        self.text = Text(self.textFrameBuffer,
                         yscrollcommand=self.scrollbar.set)
        self.text.pack(side=LEFT, fill=BOTH, expand=YES)
        
        self.scrollbar.config(command=self.text.yview)

--------The Text is filled in after this point. However, I have done the
exact same setup with a listbox, and it works just as it should-----------
-- 
View this message in context: http://www.nabble.com/Scrollbar-maybe-not-setting-right-on-a-text-widget-tp19059580p19059580.html
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.



More information about the Tkinter-discuss mailing list