Reader small image

You're reading from  Python GUI Programming with Tkinter, 2nd edition - Second Edition

Product typeBook
Published inOct 2021
Reading LevelBeginner
PublisherPackt
ISBN-139781801815925
Edition2nd Edition
Languages
Tools
Right arrow
Author (1)
Alan D. Moore
Alan D. Moore
author image
Alan D. Moore

Alan D. Moore is a data analyst and software developer who has been solving problems with Python since 2006. He's developed both open source and private code using frameworks like Django, Flask, Qt, and of course Tkinter, and is known to contribute to various open-source Python and JavaScript projects. Alan maintains a YouTube channel, “Alan D Moore Codes”, where he posts Python, PyQt, and Tkinter tutorials. Alan lives in Franklin, Tennessee, where he works for the County Government, and with his wife Cara raises a crew of children who are just as geeky as their dad.
Read more about Alan D. Moore

Right arrow

Implementing a record list with Treeview

Now that we understand how to use the Treeview widget, it's time to implement a GUI that will allow us to browse the records in the CSV file and open them for editing. Let's take a moment to plan out what it is that we need to create:

  • We want to lay out the CSV data in a table structure, similar to how it would look in a spreadsheet. This will be a flat table, not a hierarchy.
  • Each table row will represent a record in the file. When a user double-clicks the row, or highlights it and presses Enter, we want the record form to open with the selected record.
  • We don't really need to show every field in the table, since its purpose is merely to locate records for editing. Instead, we'll show only the rows that uniquely identify a record to the user. Namely, those are Date, Time, Lab, and Plot. We can also show the CSV row number.
  • There isn't really a need to sort the data, so we won't implement...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Python GUI Programming with Tkinter, 2nd edition - Second Edition
Published in: Oct 2021Publisher: PacktISBN-13: 9781801815925

Author (1)

author image
Alan D. Moore

Alan D. Moore is a data analyst and software developer who has been solving problems with Python since 2006. He's developed both open source and private code using frameworks like Django, Flask, Qt, and of course Tkinter, and is known to contribute to various open-source Python and JavaScript projects. Alan maintains a YouTube channel, “Alan D Moore Codes”, where he posts Python, PyQt, and Tkinter tutorials. Alan lives in Franklin, Tennessee, where he works for the County Government, and with his wife Cara raises a crew of children who are just as geeky as their dad.
Read more about Alan D. Moore