add example with app icon
This commit is contained in:
parent
9a069985a5
commit
d3e5694bf6
|
@ -0,0 +1,11 @@
|
|||
# example_004.py
|
||||
from tkinter import Tk, Image
|
||||
|
||||
def main():
|
||||
root = Tk()
|
||||
icon = Image('photo', file='icon.png')
|
||||
root.wm_iconphoto(True, icon)
|
||||
root.mainloop()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in New Issue