The code I have now will only print the buttons, it will not create a scroll bar. I want it to print the buttons and allow me to scroll through them. The best I could do is create the scroll bar, but not get it to attach to anything? I'm new to python GUI's so I'm not too familiar with this stuff. This is my code:
def remove1():
newWindow1 = tk.Toplevel(root)
newWindow1.title("Remove Suppliers")
newWindow1.canvas = tk.Canvas()
newWindow1.canvas.pack()
sb = tk.Scrollbar(newWindow1.canvas)
sb.pack()
newWindow1.canvas.config(yscrollcommand=sb.set)
sb.config(command = newWindow1.canvas.yview)
newWindow1.canvas.configure(scrollregion=newWindow1.canvas.bbox("all"))
newWindow1.canvas.button = []
i = 0
for keys in supplier_dict:
newWindow1.canvas.button.append(tk.Button(newWindow1, text=keys,command = lambda i=i: self.open_this(i)))
newWindow1.canvas.button[i].pack(side = "top", fill = "both")
i+=1
z = 1
edit_suppliers(supplier_dict)