Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Why my tkinter title bar is not changing?

from tkinter import*
from tkinter import ttk
from PIL import Image, ImageTk

class Face_Recognization_System:
def init(self, root):
self.root = root
self.root.title("Simple Prog")
self.root.geometry("1530×790+0+0")

if name == "main":

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

root = Tk()
obj = Face_Recognization_System()

root.mainloop()

>Solution :

There are two errors the first is in the syntax of Initialization it’s

__init__    Not   _init_

Second you should enter the root as an input.

And finally you change it up a little to separate the initialization from the other method .

from tkinter import* 
from tkinter import ttk 
from PIL import Image, ImageTk

class Face_Recognization_System:
    def __init__(self, root):
        self.root = root
    def change(self):
        self.root.title("Simple Prog")
        self.root.geometry("1530x790+0+0")

if __name__ == "__main__":

    root = Tk()
    obj = Face_Recognization_System(root)
    obj.change()

    root.mainloop()
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading