我目前正在学习Tkinter,无法找到解决我的问题的方法。Tkinter标签没有出现在窗口中,没有人知道原因。我在MacOS M1 Pro上。
from tkinter import *
root = Tk()
# Create label widget
myLabel = Label(root, text="Hello World!")
# Pack it onto the screen
myLabel.pack()
root.mainloop()
显示的结果:
发布于 2022-02-20 22:13:26
尝试将大小添加到根窗口。
from tkinter import *
root = Tk()
root.geometry("500x500")
# Create label widget
myLabel = Label(root, text="Hello World!")
# Pack it onto the screen.
myLabel.pack()
root.mainloop()
https://stackoverflow.com/questions/71201803
复制相似问题