[Tkinter-discuss] Issue with scrolling in a Text() widget on a mac

Kevin Walzer kw at codebykevin.com
Sat Jul 19 15:56:32 CEST 2008


Alexnb wrote:
> Hello everyone!
> 
> So, I have a texbox widget and I connected a scrollbar to it. On my PC
> everything works great. But on my mac, you can't scroll when you click the
> box and dragging the actual bar is very choppy. The only way it works like
> it should is the actual arrow on the end of the bar. I am wondering if this
> can be fixed? or is it just a weird bug you have to deal with?
> 
> Here is the 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)
> 
> 
This is just a guess, because there isn't enough code here to check, but 
did you set the command for the scrollbar widget? Something like

self.scrollbar.configure(command=self.text.yview)

?

I don't see that you've set this.

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com


More information about the Tkinter-discuss mailing list