forked from flatplanet/Intro-To-TKinter-Youtube-Course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.py
26 lines (15 loc) · 517 Bytes
/
base.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from tkinter import *
from PIL import ImageTk,Image
root = Tk()
root.title('Learn To Code at Codemy.com')
root.iconbitmap('c:/gui/codemy.ico')
def open():
global my_img
top = Toplevel()
top.title('My Second Window')
top.iconbitmap('c:/gui/codemy.ico')
my_img = ImageTk.PhotoImage(Image.open("images/aspen.png"))
my_label = Label(top, image=my_img).pack()
btn2 = Button(top, text="close window", command=top.destroy).pack()
btn = Button(root, text="Open Second Windo", command=open).pack()
mainloop()