Apr-07-2021, 05:48 AM
(Apr-04-2021, 10:42 PM)deanhystad Wrote: I'm guessing you mean that things move when you spin the mouse wheel. The reason this happens is because your code includes this:
def _on_mousewheel(self, event: tk.Event): self.canvas.yview_scroll(int(-1*(event.delta/120)), "units")If you tell the canvas to scroll, shouldn't it scroll?
A scrollbar is smart. It knows when to enable/disable the thumb, resize the thumb, position the thumb. It knows what to do when the scroll window is smaller or larger than the view window. Your event code is not smart. You spin the mouse wheel and it scrolls. If you want the mouse wheel to be smart, maybe it should work through the scrollbar.
Thx for the info, but what I don't understand then is when I enter widgets that span beyond the scroll view, the scrolling does in fact work correctly...