Show Large Image using Scrollbar in Python

后端 未结 3 677
你的背包
你的背包 2021-01-06 17:50

I would like to display an image using tkinter (Python 3). The image is very long. Therefore, I would like to add a vertical scrollbar. This is what I have tried:

(b

3条回答
  •  無奈伤痛
    2021-01-06 18:29

    Put the line:

    canvas.config(scrollregion=canvas.bbox(tkinter.ALL))
    

    after:

    canvas.create_image(0,0,image=img, anchor="nw")
    

    or canvas does not include image in scrollregion.

提交回复
热议问题