Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> Python

Xóa icon thanh tiêu đề Tkinter

Xóa icon mặc định cửa sổ Tkinter bằng wm_attributes('-toolwindow', 'True').

Ví dụ

# Import Tkinter
from tkinter import *

win = Tk()
win.geometry("700x350")

Label(win, text="This is a New Line Text", font=('Helvetica 14 bold'), foreground="red3").pack()

win.wm_attributes('-toolwindow', 'True')
win.mainloop()

Kết quả

Cửa sổ Tkinter không có icon trên thanh tiêu đề.

Xóa icon thanh tiêu đề Tkinter