程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

[Python] Tkinter setting window icon

編輯:Python

Ed Write No easy , also Greek at various position Big Guy the a One Next \textcolor{gray}{ It's not easy to write , I also hope you guys can support } Ed Write No easy , also Greek at various position Big Guy the a One Next

individual people Lord page : \textcolor{green}{ Personal home page :} individual people Lord page : Silent tubule

individual people network standing : \textcolor{green}{ Personal website :} individual people network standing : Silent tubule

Technology Technique hand over flow Q Q Group : 837051545 \textcolor{green}{ Technical communication QQ Group :837051545} Technology Technique hand over flow QQ Group :837051545

spot Fabulous , you Of recognize can yes I gen do Of dynamic force ! \textcolor{green}{ give the thumbs-up , Your recognition is the driving force of my creation !} spot Fabulous , you Of recognize can yes I gen do Of dynamic force !

️ closed hidden , you Of green look at yes I No force Of Fang towards ! \textcolor{green}{ Collection , Your favor is the direction of my efforts !} closed hidden , you Of green look at yes I No force Of Fang towards !

️ review On , you Of It means see yes I Into the Step Of goods rich ! \textcolor{green}{ Comment on , Your opinion is the wealth of my progress !} review On , you Of It means see yes I Into the Step Of goods rich !

If you don't understand, you can leave a message , I should see a reply
If there is a mistake , Your advice are most welcome

1.iconbitmap Set window icons

import tkinter as tk
window = tk.Tk()
window.title('Nilvya Office system ') # Change the title name 
window.geometry('327x272')
window.iconbitmap('panda.ico') # Change window icon 
window.mainloop()

2.iconphoto Set window icons

import tkinter as tk
window = tk.Tk()
window.title('Nilvya Office system ') # Change the title name 
window.geometry('327x272')
window.iconphoto(False, tk.PhotoImage(file=' Head portrait .png'))
window.mainloop()

3.tk.call Set window icons

import tkinter as tk
window = tk.Tk()
window.title('Nilvya Office system ') # Change the title name 
window.geometry('327x272')
window.tk.call('wm', 'iconphoto', window._w, tk.PhotoImage(file=' Head portrait .png')) # Change window icon 
window.mainloop()

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved