0% found this document useful (2 votes)
1K views18 pages

GUI Programming Python Tkinter

Tkinter is Python's standard GUI package and provides a basic set of widgets to build graphical user interfaces. It is bundled with Python and provides a simple and portable way to create desktop apps. While Tkinter apps may not look completely native, it is sufficient for many basic GUI needs and is easy to learn since it is built into Python.

Uploaded by

Akshit Verma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (2 votes)
1K views18 pages

GUI Programming Python Tkinter

Tkinter is Python's standard GUI package and provides a basic set of widgets to build graphical user interfaces. It is bundled with Python and provides a simple and portable way to create desktop apps. While Tkinter apps may not look completely native, it is sufficient for many basic GUI needs and is easy to learn since it is built into Python.

Uploaded by

Akshit Verma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 18

GUI programming

on Python with tkinter
no­title.victordomingos.com
What is tkinter?

"Tkinter is Python's de­facto standard
GUI (Graphical User Interface) package.
It is a thin object­oriented 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)

• Label • Text • Toplevel (+windows)


• Entry • Scale • Frame
• Button • Scrollbar • LabelFrame
• Checkbutton • Spinbox • PanedWindow
• Menubutton • Progressbar • Notebook
• Radiobutton • Treeview • Sizegrip
• Combobox • Separator • Canvas
...and some more in these modules

• 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/tkinter­index.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!

You might also like