From ef2533a7e8bae49950015cbd1a423bf8f3cdcad5 Mon Sep 17 00:00:00 2001 From: Michel Bats Date: Sun, 10 Dec 2023 13:15:35 +0100 Subject: [PATCH] Lesson #3 --- .../buttons.py | 14 ++++++++++++++ readme.md | 1 + 2 files changed, 15 insertions(+) create mode 100644 003. Creating Buttons With TKinter - Python Tkinter GUI Tutorial #3/buttons.py diff --git a/003. Creating Buttons With TKinter - Python Tkinter GUI Tutorial #3/buttons.py b/003. Creating Buttons With TKinter - Python Tkinter GUI Tutorial #3/buttons.py new file mode 100644 index 0000000..2e2f8a7 --- /dev/null +++ b/003. Creating Buttons With TKinter - Python Tkinter GUI Tutorial #3/buttons.py @@ -0,0 +1,14 @@ +from tkinter import * + +root = Tk() + + +def myClick(): + myLabel = Label(root, text="Look! I clicked a Button!") + myLabel.pack() + + +myButton = Button(root, text="Click Me!", command=myClick, fg="blue", bg="#000000") +myButton.pack() + +root.mainloop() diff --git a/readme.md b/readme.md index f4fba09..f0cf715 100644 --- a/readme.md +++ b/readme.md @@ -6,3 +6,4 @@ * [Create Graphical User Interfaces With Python And TKinter](https://www.youtube.com/watch?v=yQSEXcf6s2I&list=PLCC34OHNcOtoC6GglhF3ncJ5rLwQrLGnV) * [Positioning With Tkinter's Grid System - Python Tkinter GUI Tutorial #2](https://www.youtube.com/watch?v=BSfbjrqIw20&list=PLCC34OHNcOtoC6GglhF3ncJ5rLwQrLGnV) +* [Creating Buttons With TKinter - Python Tkinter GUI Tutorial #3](https://www.youtube.com/watch?v=yuuDJ3-EdNQ&list=PLCC34OHNcOtoC6GglhF3ncJ5rLwQrLGnV)