【发布时间】:2018-10-02 09:10:11
【问题描述】:
from tkinter import *
root = Tk()
root.geometry("800x650")
e = Entry(root, width=3, font=('Verdana', 30), justify='right')
a = b = c = e
a.place(relx=0.2, rely=0.5, anchor=CENTER)
b.place(relx=0.44, rely=0.5, anchor=CENTER)
c.place(relx=0.65, rely=0.5, anchor=CENTER)
root.mainloop()
为什么我看不到所有三个条目,它们在哪里?
但是当我这样做时:
a = Entry(root, width=3, font=('Verdana', 30), justify='right')
b = Entry(root, width=3, font=('Verdana', 30), justify='right')
c = Entry(root, width=3, font=('Verdana', 30), justify='right')
它有效...
【问题讨论】:
-
是的,您将不得不比这更难解释,因为我不明白我的代码中存在什么问题。我完全理解你的答案,但我仍然不明白我的代码到底出了什么问题。谢谢。
标签: python python-3.x tkinter tkinter-entry