Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python GUI Programming with Tkinter, 2nd edition

You're reading from   Python GUI Programming with Tkinter, 2nd edition Design and build functional and user-friendly GUI applications

Arrow left icon
Product type Paperback
Published in Oct 2021
Publisher Packt
ISBN-13 9781801815925
Length 664 pages
Edition 2nd Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Alan D. Moore Alan D. Moore
Author Profile Icon Alan D. Moore
Alan D. Moore
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Introduction to Tkinter 2. Designing GUI Applications FREE CHAPTER 3. Creating Basic Forms with Tkinter and Ttk Widgets 4. Organizing Our Code with Classes 5. Reducing User Error with Validation and Automation 6. Planning for the Expansion of Our Application 7. Creating Menus with Menu and Tkinter Dialogs 8. Navigating Records with Treeview and Notebook 9. Improving the Look with Styles and Themes 10. Maintaining Cross-Platform Compatibility 11. Creating Automated Tests with unittest 12. Improving Data Storage with SQL 13. Connecting to the Cloud 14. Asynchronous Programming with Thread and Queue 15. Visualizing Data Using the Canvas Widget 16. Packaging with setuptools and cxFreeze 17. A: A Quick Primer on reStructuredText 18. B: A Quick SQL Tutorial 19. Other Books You May Enjoy
20. Index
Appendices

The Ttk Treeview

For users to be able to view the contents of a CSV file and select records to edit, we'll need to implement a new view in the application capable of displaying tabular data. This record list view will allow our users to browse the content of the file and open records for viewing or editing.

Our users are accustomed to seeing this data in a spreadsheet, laid out in a table-like format, so it makes sense to design our view in a similar fashion.

For building table-like views with selectable rows, Tkinter gives us the Ttk Treeview widget. To build our record list view, we'll need to learn about Treeview.

Anatomy of a Treeview

To help us explore the treeview, let's go through a few basic terms and concepts related to the widget. A treeview is designed to display hierarchical data; that is, data that is organized into nodes, where each node can have exactly one parent node and zero or more child nodes. The following diagram shows an example...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime