开发者

Python Tkinter Root Title doesn't work

开发者 https://www.devze.com 2023-03-25 04:46 出处:网络
I can\'t seem to title my windows. They all have the title \"Tk\".I believ开发者_高级运维e my code is correct, so correct me if this is wrong...

I can't seem to title my windows. They all have the title "Tk".I believ开发者_高级运维e my code is correct, so correct me if this is wrong...

from Tkinter import * 
root = Tk()
root.title="Title"
root.mainloop()

The title is still Tk(). Could I maybe from Tkinter import Tk as MyTitle?


root.title("Title")

Try that, its a method you invoke and pass in the parameter.

0

精彩评论

暂无评论...
验证码 换一张
取 消