如何在 python 3.5 tkinter 中设置 yscrollbar(垂直)的尺寸?

如何在 python 3.5 tkinter 中设置 yscrollbar(垂直)的尺寸?
class Application(Frame):
    def __init__(self, boss=None):
        Frame.__init__(self)
        self.master.title('Prog APPX - Snowman - 2017')
        mBar = MenuBar(self)
        mBar.pack()
        self.can=Canvas(self, bg='light blue', height=900,
                        width=1250)
        scroll=Scrollbar(self, bd=1, orient=VERTICAL, command=self.can.yview)
        self.can.configure(yscrollcommand=scroll.set)
        scroll.pack(side=RIGHT, expand=NO, fill=Y, padx=2, pady=2)
        self.photo=PhotoImage(file='brain.gif')
        self.item=self.can.create_image(625, 450, image=self.photo)
        self.can.create_text(625, 230, anchor=CENTER, text="Welcome!",
                    font=('Times', 36), fill='blue')
        self.can.pack(side=LEFT, expand=YES, fill=BOTH, padx=2, pady=2)
        self.pack()

这段代码将我的 yscrollbar 放在画布的右侧,但滚动条沿 NS 已满。我怎样才能让它变小?

相关内容