2

Is it possible to make the ScrolledWindow respond to the mouse's scroll wheel? When I scroll the mouse wheel, it currently does nothing, but it is a huge minus for the usability when the user has to manually click and drag the scrollbar. The documentation on ScrolledWindow is so limited that I couldn't find the answer.

from tkinter import *
from tkinter.tix import *

root = Tk()

w = ScrolledWindow(root, width = 500, height = 700)
w.grid(row = 0, column = 0)
win = w.window

for i in range(50):
    Label(win, text = 'lorem ipsum').grid(row = i, column = 0)

root.mainloop()

Thanks.

Ouverflou
  • 51
  • 4

1 Answers1

0

I saw your question and I've been researching, the issue for a while now as I had a similar problem a while back, the solution I found was to use ttk.Treeview, what are you intending to use it for? would a tk canvas be functionally equivalent for you?

jbaldwin
  • 924
  • 1
  • 7
  • 21
  • It's basically a quiz application, where questions with checkboxes are displayed. If there are questions than can fit the screen, the user should be able to scroll through the questions. I solved it with Canvas, but I was wondering if it could be done with ScrolledWindow, thus avoiding messing around with the canvas. – Ouverflou Nov 15 '12 at 16:42
  • I'm sorry but it doesn't seem like it, you could possibly use something like wxpython? I believe there is a scrolled window widget in there, but I'm not sure, and I'm not sure if it would fix your issue. Also I've read some things that worry me about the licensing with wx... – jbaldwin Nov 15 '12 at 16:52