Using Tkinter in python to edit the title bar

Posted by Dan on Stack Overflow See other posts from Stack Overflow or by Dan
Published on 2010-03-07T06:50:21Z Indexed on 2010/03/08 2:13 UTC
Read the original article Hit count: 384

Filed under:
|
|
|

I am trying to add a custom title to a window but I am having troubles with it. I know my code isn't right but when I run it, it creates 2 windows instead, one with just the title tk and another bigger window with "Simple Prog". How do I make it so that the tk window has the title "Simple Prog" instead of having a new additional window. I dont think I'm suppose to have the Tk() part because when i have that in my complete code, there's an error

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")

© Stack Overflow or respective owner

Related posts about python

Related posts about tkinter