Tkinter एक window या frame बनाता है जो program execute करने के बाद दिखाई देता है। चूंकि Tkinter में सभी functions और modules independent हैं, हम window attributes को customize करने के लिए विशेष रूप से एक particular function का उपयोग कर सकते हैं।
Tkinter हर एप्लिकेशन के लिए एक default root window बनाता है। Tkinter window के default title को customize या edit करने के लिए, हम निम्न विधि का उपयोग कर सकते हैं:
title(text="your title")
आइए Tkinter frame के object को initiate करके एक window बनाएं और window या frame के title को edit करें।
उदाहरण
# Import the library
from tkinter import *
# Create an instance of window
win = Tk()
# Set the geometry of the window
win.geometry("700x400")
# Set the title of the window
win.title("tutorialspoint.com")
# Create a label if needed
Label(win, text="The Title is tutorialspoint.com", font=('Helvetica bold', 20), fg="green").pack(pady=20)
# Keep running the window or frame
win.mainloop()
आउटपुट
उपरोक्त Python code title को tutorialspoint.com के रूप में set करेगा।
