Attachment 'lecture4_button.py'
Download 1 #!/usr/bin/python
2
3 from Tkinter import *
4
5
6 def Call():
7 lab= Label(root, text = 'You pressed\nthe button')
8 lab.pack()
9 button['bg'] = 'blue'
10 button['fg'] = 'white'
11
12 root = Tk()
13 root.geometry('100x110+350+70')
14 button = Button(root, text = 'Press me', command = Call)
15 button.pack()
16
17 root.mainloop()
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.