The principle of changing the title of a tkinter main root window is the same as we discussed in the previous recipe: How to create independent message boxes. We just pass in a string as the first argument to the constructor of the widget.
How to create the title of a tkinter window form
Getting ready
Instead of a pop-up dialog window, we create the main root window and give it a title.
How to do it...
The following code creates the main window and adds a title to it. We have already done this in the previous recipes; for example, in the Creating tabbed widgets recipe...