Tkinter GUI-based applications बनाने के लिए सबसे commonly used Python library है। इसमें widgets add करने और अन्य necessary attributes जैसी features हैं।
मान लीजिए हम tkinter का उपयोग करके borderless window बनाना चाहते हैं। Borderless window बनाने के लिए, हम overrideredirect method का उपयोग कर सकते हैं जो basically window को disable करता है और window elements जैसे closing button, title, minimization element और buttons आदि को remove करता है।
overrideredirect एक Boolean function है जो True या False हो सकता है। एक बार window खुलने पर, इसे Alt+F4 दबाकर close किया जा सकता है।
उदाहरण
# Importing the tkinter library
from tkinter import *
# Create an instance of tkinter frame
win = Tk()
# Define the size of the window or frame
win.geometry("700x400")
# Define the window text widget
lab = Label(win, text="Hello World", font=('Time New Roman', 35), fg="green", anchor="c").pack()
# Make the window borderless
win.overrideredirect(True)
win.mainloop()
आउटपुट
उपरोक्त code चलाने से output generate होगा और एक borderless window दिखाएगा।
