how to change the text in the title bar of the Tkinter windows

A

Ali

When I open a window using the Tkinter GUI thing the title bar always
says "Tk". I would like to know how to change this. I would also like
to know how to cjange it on any other popup windows I may have. Please
help.
 
J

Jeremy Bowers

Um.... is this right? It is supposed to show a window with the
titlebar showing The Title.

Did it work when you tried it? That is the answer to your question. (Why
do you want to wait hours or days for some stranger to tell you what the
copy of Python sitting in front of you will do with 4 lines of code?)
 
B

Beeyah

I looked at the website but I did not understand.

Um.... is this right? It is supposed to show a window with the
titlebar showing The Title.

from Tkinter import *

root = Tk()

root.title("The Title")

root.mainloop()

Yes, that's correct.
 
Joined
Sep 12, 2013
Messages
1
Reaction score
0
Changing title of a Tkinter control

Here's how I did it for an Entry box:

master = Tk()
master.title("new text")
e = Entry(master)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top