python 3.x - Scroll through a tkinter frame or window -


this question has answer here:

i creating window quite long, , want have scrollbar able scroll vertically through window (it's settings window). know how have scrollbar scroll vertically through contents of text widget, , tried applying same this, didn't work:

from tkinter import *  root = tk()  frame = frame(root) scroll = scrollbar(root)  frame.pack(side = left, fill = both, expand = true) scroll.pack(side = right)  frame.config(yscrollcommand = scroll.set) scroll.config(command = frame.yview)  root.mainloop() 

with text widget, worked fine, frame widget, above, gave me error saying frame had no attribute called yscrollcommand.

is there way can this?

i don't think frames support scrolling (there no .yview method.) put canvas support scrolling in place of or inside frame hold contents of page , scrolling after.

this good, comprehensive tkinter resource details capabilities , examples of widgets. http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -