Python:为什么我的滚动条不会出现在使用Tkinter?

时间:2016-11-27 05:45:38

标签: python tkinter scrollbar

以下是我的代码:

dialog_canvas = Canvas(dialog_frame, scrollregion = (0, 0, 450, 265), bg = 'white')
dialog_canvas.pack(expand = YES, fill = BOTH, side = LEFT)
yscroll = ttk.Scrollbar(root, orient = VERTICAL, command = dialog_canvas.yview)
dialog_canvas.config(yscrollcommand = yscroll.set)
yscroll.grid(row = 1, column = 1, sticky = 'ns')

0 个答案:

没有答案