0

Simple question: how can I position my (horizontal) scrollbar (self.scrollbar) to the center.

I know there is self.scrollbar.set() and but for some reason when I try this command:

def centerScroll(self):
    loc = self.scrollbar.get()
    self.scrollbar.set(loc[0]+0.5, loc[1]+0.5)

nothing happened. The scrollbar did not position to the center.

(if you want to know more about the context see this post)

stovfl
  • 14,998
  • 7
  • 24
  • 51
Programer Beginner
  • 1,377
  • 6
  • 21
  • 47
  • Possible duplicate of [Correct way to set scrollbar position in python tkinter](https://stackoverflow.com/questions/53157859/correct-way-to-set-scrollbar-position-in-python-tkinter). You can't do that, read the dups Answer. – stovfl Dec 23 '18 at 16:20
  • Please show a [mcve]. The answer is to call the `set` method. If it's not working, it's a bug in your code. If we can't duplicate the problem then we can't fix it. – Bryan Oakley Dec 23 '18 at 17:24

0 Answers0