GUI Programming Python Tkinter
GUI Programming Python Tkinter
on Python with tkinter
notitle.victordomingos.com
What is tkinter?
"Tkinter is Python's defacto standard
GUI (Graphical User Interface) package.
It is a thin objectoriented layer
on top of Tcl/Tk."
Tkinter examples you may have seen...
Tkinter examples you may have seen...
With ttk, you get a nicer look.
Themed widgets can match the platform.
And it can grow, if you need it.
The boilerplate:
Available widgets (incl. ttk)
• tkinter.scrolledtext
• tkinter.colorchooser
• tkinter.filedialog
• tkinter.messagebox
• turtle
Let’s see it in action!
So, should I use tkinter?
So, should I use tkinter?
PROS
• It’s simple to learn.
• Bundled with Python.
• Highly portable.
• Can look [kind of] native.
• It’s fast enough.
• Mature and stable.
• Free for commercial use.
So, should I use tkinter?
PROS CONS
• It’s simple to learn. • Limited widget set (e.g. no
• Bundled with Python. date picker, no webview).
• Highly portable. • No UI designer.
• Can look [kind of] native. • Doesn’t look totally native.
• It’s fast enough. • It’s not as fast as a native
Swift or C++ GUI.
• Mature and stable.
• Usually, no new features.
• Free for commercial use.
More info:
• https://docs.python.org/3/library/tk.html
• https://tkdocs.com
• http://effbot.org/tkinterbook/tkinterindex.htm
• http://infohost.nmt.edu/tcc/help/pubs/tkinter/tkinter.pdf
If you speak Tcl, explore Tcl/tk docs too.
Useful books:
Tkinter GUI Aplication
Development Blueprints
Bhaskar Chaudhary
Packt Publishing, 2015
Python GUI Programming Cookbook
Burkhard A. Meier
Packt Publishing, 2017
In case you get stuck...
• https://stackoverflow.com/questions/tagged/tkinter
Sooner or later, you will probably find, on StackOverflow,
some insightful answers from a guy named Brian Oakley.
You definitely should trust him.
Thank you!