如何在框上放置按钮(使用bg颜色后)

时间:2019-06-27 06:38:21

标签: python-3.x tkinter

按钮没有出现在框架上。

按钮后我pack()帧:

from tkinter import *

master = Tk()master.title('Order')

class App:def new_win():master.withdraw()newWindow=Toplevel(master)btn = button1(newWindow)

class button1():def __init__(self, master):self.master=masterself.frame=Frame(self.master)self.b3=Button(self.master, text="Order Now!")self.b3.pack()self.frame.pack()

display=App()fm=Frame(master, width=400, height=500, bg='red').pack()btn = Button(fm, bd=5, padx=40, pady=50, width=40, text='New Admission',command=App.new_win).pack()master.mainloop()

如何在我的框架中添加Button

0 个答案:

没有答案