▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My RU-vid Channel: bit.ly/2UFLKgj bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN ▶️ Get The Code bit.ly/3fLFQ8p
We can also do this for hiding the ghost column: tree = ttk.Treeview(root, columns=columns, show='headings') The show='heading' hides the first column (column #0) of the Treeview. The show option accepts one of the following values: 'tree' - shows the column #0. 'heading' - shows the header row. 'tree headings' - shows both column #0 and the header row. This is the default value. '' - doesn’t show the column #0 or the header row. Right ?
I hope you to make video on how to edit the shape of the treeview colors , padding and other stuffs . You are the best one who explains tkinter widgets.
Thank you so much for your helpful videos! Just curious, is there a reason you are using an iterator variable for your for loops instead of enumerate()? Just curious if I have been doing it wrong or if there are any serious drawbacks to using enumerate. Thanks! EDIT: Specifically at 18:05
Hi John, thank you for the tutorial. I have a little problem, I hope you could help me. I have two Treeviews next to each other, and I want them to be of the same width. The problem is that I have many headings, so the first one occupies almost all the space, and the second one is superthin (as much as the space that's left allows). Can you give me a hint on how to fix the width of treeviews? Thank you a lot, your videos are very helpful :D
its a great effort sir, I have a question that in most of software grid is used to separate between cells in display here how can we deploy grids in Treeview, please comment
Thanks for this video #116. My question: Once we have the table, it is posible ti completely hide it and show a new one with same headers buth diferent rows data?
Sure, I probably have videos back at the beginning of the playlist on hiding widgets. Then you would just build a second one with whatever headers you wanted.
Thanks for your helpful videos. It's ideal if you have a tutorial video showing how to add multiple rows (such as data in this treeview tutorial video) into a database (such as MySQL). All users have to do is to press a button to save those rows of data in the treeview into the db. Many thanks!
Hi everyone! I couldn't find information on the Internet. Therefore, I just wanna ask in here. Is it possible to display numbers in treeview tkinter with separator , isn't?
Great tutorital. I know it's an old video but it would be really nice if you could do zoom out of the display. It's hard to see the all lines of code (or most of them) while you're explaining.
Thanks a lot for all the videos! They're super helpful! A very general question, I need to present tabular data from a SQL query. What is the best way to do that? Frame, Treeview, Table class, something else? It doesn't have to be super fancy, its more about getting data on the screen :)
Is there a way to prevent the expansion triangle from being indented in sub rows? I want my expansion triangles to always be up against the left side no matter how indented the rest of the row is.
Hi John. As always, great tutorial and very well explained! I am building an app where I can generate a different Treeview based on different options selected from one or more comboxboxes. I would select 1 or more comboboxes and then hit a button called 'Generate Report' and it will display the data in the treeview. What I am struggling to do is each time I hit the 'Generate Report' button, it always creates another Treeview widget below the previous Treeview widget. I want the function to be able to 'remove' the treeview widget and then display the different Treeview widget once the function has completed. I have tried placing pack_forget() in certain places in the function but it doesn't seem to be working. Any tips on what things I need to look at or look into?
Many ways to do it, pack_forget, destroy, .config, etc. You could put each treeview in a frame then hide/show the frames...you could use the same treeview but just delete all the data in it each time...like I said, there's just a ton of ways to do it. If pack_forget didn't work for you, it's probably because you didn't do it correctly :-p
sir actually i want to fill a *cell* with many string.... if i fill the by treeview its hiding so pls tell how to increase the row height like column sir
I need to scan a server, that has values and nodes. Each node may have a children nodes and so on. I scan it recursively. Is it possible to use Treeview to show the contects of a server?
Thank you for your wonderful videos! How can I add the the indices of the dataframe to the rows of the phantom column when I initialize the tree with the following code? tree = ttk.Treeview(root) tree.pack() df=pd.read_excel("Iris.xlsx") df_rows=df.to_numpy().tolist() cols = list(df.columns) tree['columns'] = cols for col in cols: tree.heading(col, text=col) for row in df_rows: tree.insert("", "end", values=row) tree.column('#0', width=50, stretch='no')
Good morning, can you help me with Python? I have a Python program that takes data and writes it to a database. But I need to add a function that takes the registration date, and counts 90 days, and after 90 days print a message to the user informing that the registration already has 90 days, you know? I'm researching on the internet but I'm not able to develop something that works, I don't know anyone who understands and can help me with this, can you help me?
@@Codemycom Nice, if you could do a tutorial for it, it would be great. I know that `mutagen.File(filepath, easy=True)` returns a dictionary of information tags inside the music file. So I can do a for loop, and use the index of those to insert into specific columns maybe ... Well, what's the point of learning to code, if you can't experiment :D.
@@Codemycom I wanted to ask another thing, you showed how to `askopenfilename()`, what if I want to add a folder, or bunch of folders instead of files?
when i add like 20 columns my screen will expand and i can not see the end, if there any method where i can fix that, like the Treeview could be expand in the Fram but not the Fram! thanks
@@Codemycom i used the Pack method and git ride of the Grid method for the sscrollbar with expand=X and expand=Y and it work for me, thnak's for support
one another question as you are profi, what do you think is the most beautiful GUI libs from python? i find tkinter look very old, but you made it junger ;) any idea modern GUI with powerful resourcess on Internet?
hey thank you so much for the awesome tutorials again! I'm having a little bit of trouble. I'm getting an error saying: unknown option "-idd". That's pretty strange becaus it is an option ;p can someone help me pleas becaus I really want to continue with these tutorials they're verry interesting. Greetings from Belgium!!!
okay.. 2 years later , now something has changed with treeview because I have errors using “.insert(parent,index,iid,text,values())” declaration but with “data[[],[]] “ , it works just fine🤔
@@Codemycom 🤔umm then..what could cause this error :res=self.tk.call(self._w, “insert”, parent, index, _tkinter.TclError: Item not found…I am writing the same code like your😳