add example with app icon
This commit is contained in:
11
example_004.py
Normal file
11
example_004.py
Normal file
@@ -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()
|
||||||
Reference in New Issue
Block a user