ในการลบไอคอนเริ่มต้นของหน้าต่าง Tkinter เราสามารถใช้ wm_attributes('type', 'value') โดยระบุประเภททรัพย์สิน ในตัวอย่างต่อไปนี้ เราจะใช้ '-toolwindow ' ค่าบูลีนที่ลบไอคอนที่เกี่ยวข้องกับแถบชื่อเรื่องของแอปพลิเคชัน
ตัวอย่าง
#Import the tkinter library
from tkinter import *
#Create an instance of tkinter frame
win = Tk()
win.geometry("700x350")
#Create a Label to print the Name
label= Label(win, text="This is a New Line Text", font= ('Helvetica 14 bold'), foreground= "red3")
label.pack()
win.wm_attributes('-toolwindow', 'True')
win.mainloop() ผลลัพธ์
เมื่อเราเรียกใช้โค้ดข้างต้น จะแสดงหน้าต่าง Tkinter โดยไม่มีไอคอนเริ่มต้นบนแถบชื่อ
