Show mailing list with Tkinter

0

I'm running a Tkinter program that relies on an email box. I intend, in a Tkinter window to show a list of emails based on a directory with .txt files (which are emails). I've been looking for a command to create a box and show the txt names in lines but I can not find them. Does anyone know any?

    
asked by anonymous 10.01.2016 / 02:57

1 answer

0

There is a widget called Treeview , which is part of the ttk module (a submodule of tkinter), which allows you to have a sort of table where you can clearly add rows (or even a hierarchy of lines (one underneath others as if they were daughters of one another).

Here is an example that I had created a long time ago where it shows you how to remove lines from a Treeview , clearly shows you how to add (if not how could you remove something that does not exist?).

  

link

You can also add event handlers to specific lines. For example, if you wanted to call a function when you click on a line, you can do it by applying what are called "tags".

If you want to know more about this widget (and how to add "tags"), take a look at this rather well-written article and with other examples:

  

link

Note that this article also has code for other programming languages other than Python, but you can specifically read Python-only code if you specify it on the right side above, in a drop-down menu that is called "Show."

There are also other third-party bookstores that allow you to create even tables. For example, this here that I have as a repository in my Github account created by Guilherme Polo. But there are others, such as tkintertable. If not you could also create your table, but it might not be worth it.

    
10.01.2016 / 03:29