我在python 3和sqlite3中使用Tkinter,我创建了具有两个按钮和文本标签的注册表单,当我在签名窗口中创建另一个b \ utton时出现错误时,单击按钮上的符号后,我要打开一个新窗口
def new_winF():
newwin = Toplevel(root)
newwin.geometry('500x500')
# display = Label(newwin, width=70, height=80)
label_zero = Label(newwin, text="SignIn form", width=20, font=("bold", 20))
label_zero.place(x=90, y=63)
label_one = Label(newwin, text="Email", width=20, font=("bold", 10))
label_one.place(x=80, y=130)
label_one = Entry(newwin, textvar=Email)
label_one.place(x=240, y=130)
label_two = Label(newwin, text="Password", width=20, font=("bold", 10))
label_two.place(x=80, t=180)
label_two = Entry(newwin)
label_two.place(x=240, y=180)
buttonSignIn = Button(root, text="Sign in", width=10, bg='black', fg='white', command=new_winF).place(
x=140, y=430)
答案 0 :(得分:3)
可能是由于以下错误:
label_two.place(x=80, t=180)
可能应该是:
label_two.place(x=80, y=180)
因为在place()方法中没有选项t。