Computer >> कंप्यूटर ट्यूटोरियल >  >> प्रोग्रामिंग >> Python

Python में Tkinter का उपयोग करके Title Bar Edit कैसे करें?

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 करेगा।

Python में Tkinter का उपयोग करके Title Bar Edit कैसे करें?

  1. Tkinter विंडो को अन्य विंडोज़ के ऊपर कैसे लाएं? Tkinter विंडो को अन्य विंडोज़ के ऊपर कैसे लाएं?

    जब भी हम कोई GUI प्रोग्राम बनाते हैं, तो Tkinter आमतौर पर आउटपुट स्क्रीन को बैकग्राउंड में दिखाता है। यानी, Tkinter प्रोग्राम विंडो को अन्य प्रोग्राम्स के पीछे प्रदर्शित करता है। Tkinter विंडो को दूसरों के ऊपर लाने के लिए, हमें attributes(-topmost, True) प्रॉपर्टी का उपयोग करना होगा। यह विंडो को सबस

  1. Tkinter Python में Thread का उपयोग कैसे करें? Tkinter Python में Thread का उपयोग कैसे करें?

    Tkinter के साथ, हम Threading का उपयोग करके एक समय में multiple functions call कर सकते हैं। यह एप्लिकेशन में कुछ functions के asynchronous execution को प्रदान करता है। Python में thread का उपयोग करने के लिए, हम threading नामक module import कर सकते हैं और इसकी Thread class को subclass कर सकते हैं। अपन

  1. Python Tkinter Root Window से कैसे छुटकारा पाएं? Python Tkinter Root Window से कैसे छुटकारा पाएं?

    कभी-कभी, Tkinter एप्लिकेशन test करते समय, हमें Tkinter default window या frame को hide करने की आवश्यकता हो सकती है। हमारे Tkinter window को या तो hide करने या destroy करने के दो general methods हैं। mainloop() Tkinter window को तब तक चलाता रहता है जब तक इसे external events द्वारा close नहीं किया जात