I am trying to figure out how to change the title of a Tkinter Frame. Below is simplified code that mimics the portion of my program where I am trying to change the title:
from Tkinter import *
class start_window(Frame):
def __init__(self, parent=None):
Frame.__init__(self, parent)
Frame.pack(self)
Label(self, text = 'Test', width=30).pack()
if __name__ == '__main__':
start_window().mainloop()
With this sample code the Frame has the standard "tk" title but I would like to change it to something like "My Database". I've tried everything I can think of with no success. Any help would be appreciated.
Try this:
if __name__ == '__main__':
root = Tk()
root.title("My Database")
root.geometry("500x400")
app = start_window(root)
root.mainloop()