我想向窗口添加一个自定义标题,但我遇到了麻烦。我知道我的代码是不正确的,但是当我运行它时,它会创建2个窗口,一个只带有标题tk,另一个带有“Simple Prog”的更大窗口。我怎样才能让tk窗口的标题为“Simple Prog”,而不是有一个新的附加窗口。我不认为我假设有,因为当我有,在我的完整代码,有一个错误在python中使用Tkinter编辑标题栏
from tkinter import Tk, Button, Frame, Entry, END
class ABC(Frame):
def __init__(self,parent=None):
Frame.__init__(self,parent)
self.parent = parent
self.pack()
ABC.make_widgets(self)
def make_widgets(self):
self.root = Tk()
self.root.title("Simple Prog")
来到这里,但我实际上是寻找http://stackoverflow.com/questions/30009909/change-title-of-tkinter-application-in-os-x-menu-bar在其他人的情况下 – Andrei 2015-06-07 10:39:17