Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Finally, we need to show an alert window when the timer runs out.
The official docs for Tkinter aren't the best in the world but they'll get you started. The documentation from effbot hasn't been updated in about a decade but it's actually still mostly accurate. These are my two main resources for learning Tkinter and preparing this workshop.
More information about colors and fonts.
Terms and things
Tk()
- A Tkinter application. This is what is responsible for the window or application you see on your screen. You'll end up binding most things to this.
mainloop()
- The loop that keeps your Tkinter app running. This loop runs forever.
Frame
- An invisible box that you can put things in.
Label
- A piece of text on the screen.
Button
- A button (whodathunk?!)
StringVar
- A variable that holds onto a string.
IntVar
- A variable that holds onto an int.
trace()
- A way to follow the changes and access of a variable.
columnconfigure()
and rowconfigure()
- Methods to configure the number and weight of columns and rows.
pack()
- Method to insert a widget in the available space.
You need to sign up for Treehouse in order to download course files.
Sign up