Color and Style Our Treeview - Python Tkinter GUI Tutorial

  Рет қаралды 64,749

Codemy.com

Codemy.com

3 жыл бұрын

In this video we'll change the color and style of our Tkinter Treeview widget!
Changing the style and color of a Treeview is pretty simple, but not as simple as you might expect. We actually need to use a couple of different things to do it; namely a ttk Style and a ttk Theme.
We haven't talked about ttk.Style() widgets much in the past, and we haven't looked at themes at all. But they're both pretty simple :-)

Пікірлер: 84
@Codemycom
@Codemycom 3 жыл бұрын
▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My KZbin 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
@rubycon9158
@rubycon9158 3 жыл бұрын
Love the positive vibe you've been emitted in this tkinter series John! Now i haven't watched all of them yet, but i will :D
@Codemycom
@Codemycom 3 жыл бұрын
Thanks! Glad you're enjoying them!
@ghostblackmormor8120
@ghostblackmormor8120 9 ай бұрын
Thanks for your videos man, when I'm in doubt I always end in one of your videos, I like them, they are short and well explained!
@Codemycom
@Codemycom 9 ай бұрын
Glad you like em!
@user-fk4xm2fd6y
@user-fk4xm2fd6y 3 жыл бұрын
I love you and I love your way of explaining am a big fan of you john Clean and understandable explaining
@Codemycom
@Codemycom 3 жыл бұрын
Thanks! Glad you're enjoying the videos!
@py_tok5589
@py_tok5589 3 жыл бұрын
I didnt know how to use STYLE, THEME, ROW HEIGHT,FIELDBACKGROUND, thank you so much John
@Codemycom
@Codemycom 3 жыл бұрын
Happy to help!
@NotBeHaris
@NotBeHaris 3 жыл бұрын
another great tutorial. Thanks
@Codemycom
@Codemycom 3 жыл бұрын
You're welcome
@eveofinconsistency
@eveofinconsistency Жыл бұрын
Thaaank you so much for this and all other vids you produce it really helped me on my college thank you so much
@Codemycom
@Codemycom Жыл бұрын
Happy to hear it!
@perfil_anonimo_83_br
@perfil_anonimo_83_br 2 жыл бұрын
A nice work, thank you so much.
@Codemycom
@Codemycom 2 жыл бұрын
Welcome!
@suzum0978
@suzum0978 3 жыл бұрын
Great vid !
@Codemycom
@Codemycom 3 жыл бұрын
Thanks!
@_ARIC_KAJI
@_ARIC_KAJI 3 жыл бұрын
Thank you so much for make this video.
@Codemycom
@Codemycom 3 жыл бұрын
Happy to do it!
@user-ur1gv4lc5e
@user-ur1gv4lc5e 5 ай бұрын
Thanks so much for your efforts
@Codemycom
@Codemycom 5 ай бұрын
Welcome
@milin_234
@milin_234 3 жыл бұрын
You are just awesome..
@Codemycom
@Codemycom 3 жыл бұрын
Thank you so much 😀
@goldendovah7613
@goldendovah7613 3 жыл бұрын
Foreground option defaults to black for me. Since you didn't change it in your video I wonder if you'd have the same problem.
@RyanDanielG
@RyanDanielG 2 жыл бұрын
Smash that like button guys n gals! its free! great python tkinter tutorial, Codemy. Thanks
@urvashi2004
@urvashi2004 2 жыл бұрын
Is it possible to add gridlines in Treeview?
@joeyblaq9952
@joeyblaq9952 2 жыл бұрын
🔥🔥
@honzajasansky861
@honzajasansky861 3 жыл бұрын
Hi, Is there a way to change background color of just one cell inside of a row? I can´t find a solution anywhere.
@hassanfadde5249
@hassanfadde5249 3 жыл бұрын
how to change background of a specific cellule ? , thank you very much
@user-sf4uw5wp6e
@user-sf4uw5wp6e 3 жыл бұрын
I have a small problem about that, the style for treeview effects the background of comboboxs of tkinter and have the same color of the color of treeview headings , i think because of ttk , can i solve that ? , thank you
@consultmohamedgamal5643
@consultmohamedgamal5643 3 жыл бұрын
Very Good
@Codemycom
@Codemycom 3 жыл бұрын
Thanks
@karimboudra7272
@karimboudra7272 2 жыл бұрын
Great thank you a lot
@Codemycom
@Codemycom 2 жыл бұрын
You are welcome!
@sohammandal3511
@sohammandal3511 3 жыл бұрын
how to set the height of heading row seperately??? plz help
@ramehharmouch6561
@ramehharmouch6561 3 жыл бұрын
Hello dear, when run the program, and have a button linked to open another window for data entry related for the first window. Example: in the first window there is a data about a user, there is a button for update info in another window, so how to force the user in the second window, and don't return to first one if he click on the first one?
@kadiawilliamson8187
@kadiawilliamson8187 3 жыл бұрын
Any chance you can post more about ttk style and themes stuff very soon?
@briangreenberg153
@briangreenberg153 3 жыл бұрын
Color and style as described work beautifully (Mac OS) when the Treeview is put in the root as in your video. However, when I put the identical Treeview code in the a frame, it is displayed with bland default appearance. Wonder if you have seen this before and if there is a way with small change to make it work just as well in a frame. Thanks!
@Codemycom
@Codemycom 3 жыл бұрын
I can't think of a reason why it would act like that, so I'm guessing you just have a typo somewhere
@31925604
@31925604 Жыл бұрын
Same happened to me. The same code that works in an app doesn't works in another.
@elt_junior
@elt_junior Жыл бұрын
Try to set a parent for your style element. That worked for me.
@comrade_manof
@comrade_manof Жыл бұрын
please explain how to make one row of tree as "disabled"? When I can't chage this row. Actually i make a Checkbox treeview from ttkwidgets and want to make some rows as disabled to prevent set "check" status to checkbox.
@lanelauhoff
@lanelauhoff 3 жыл бұрын
A theme video would be much appreciated!
@Codemycom
@Codemycom 3 жыл бұрын
Coming soon :-)
@kunaloswal5687
@kunaloswal5687 2 жыл бұрын
does style ttk widget gets applied to only other ttk widgets?
@mohammadsorour1
@mohammadsorour1 2 жыл бұрын
how apply the same sytle to another treeview in the same .py file
@andrewzweden2763
@andrewzweden2763 2 жыл бұрын
I had a question for you a scrollbbarr does that automatically in python then
@dogeee8071
@dogeee8071 Жыл бұрын
would it be possible to wrap the text in one entry? Like have multiple lines for one entry because if the text is too long it just doesnt show
@Codemycom
@Codemycom Жыл бұрын
entry widgets don't wrap. You'll have to use something else.
@gajugadekar5905
@gajugadekar5905 3 жыл бұрын
Hello sir I want to set limit for entry block can How I can set it
@ertugruldugencioglu5899
@ertugruldugencioglu5899 3 жыл бұрын
how to change columns font and columns font size (not heading)
@yaslopes
@yaslopes 2 жыл бұрын
How i add the treeview on an canvas? I have a bg image, and i need the tree over the image
@Codemycom
@Codemycom 2 жыл бұрын
In the same way you add anything to a canvas
@jean-luccheffert
@jean-luccheffert Жыл бұрын
How to add a column border with a specific color and thickness
@folody9959
@folody9959 3 жыл бұрын
a good video :))
@Codemycom
@Codemycom 3 жыл бұрын
Thanks!
@folody9959
@folody9959 3 жыл бұрын
How to make animation button in tkinter ??
@Codemycom
@Codemycom 3 жыл бұрын
@@folody9959 I have a video on that in the playlist
@folody9959
@folody9959 3 жыл бұрын
@@Codemycom Where's that video
@Codemycom
@Codemycom 3 жыл бұрын
@@folody9959 The link to the playlist is pinned at the top of the comments section bit.ly/2UFLKgj
@py_tok5589
@py_tok5589 3 жыл бұрын
I just I had one question, I did try to change the colour from grey to a yellow, basically highlight the header(very first row:name, ID, Favourite Pizza) but I couldn't it, may be you can explain that in a future video, Thank you very much
@Codemycom
@Codemycom 3 жыл бұрын
Didn't I show how to do that in this video?
@BusFingals
@BusFingals 8 ай бұрын
@@Codemycom No, you only worked with rows. Headings were changed only with theme. You did not show how to change heading to any color of preference. I also struggle with this problem. Other tutorials show that part explicitly, but unfortunately it does not work on my win10 machine. I guess there are some changes in lib that prevent us from changing header colors.
@Codemycom
@Codemycom 8 ай бұрын
@@BusFingals no there were no changes to the lib
@BusFingals
@BusFingals 8 ай бұрын
@@Codemycom I found where my bug was. In the line below I had word "heading" instead of "Heading" (with capital H). myStyle.configure("Treeview.Heading", background="blue") No errors were thrown in my original code. It made me think that there are no syntax errors. I spent two days to find a solution. Thankfully I finally run a code snippet generated by Bard (Google's AI). To my great surprise it worked. Few clicks later I found the issue. Now I know why some programmers are filled with rage. :D
@labputer7500
@labputer7500 3 жыл бұрын
It possible with a Combobox ? PRINCIPALY THE BACKGROUND COLOR
@Codemycom
@Codemycom 3 жыл бұрын
huh?
@lucasbenevides86
@lucasbenevides86 3 жыл бұрын
If I have more tables, how do I style each one? Hugs from Brazil
@Codemycom
@Codemycom 3 жыл бұрын
In the same way
@b24rudrapatel99
@b24rudrapatel99 3 жыл бұрын
Whenever he makes mistake he said it's a Sunday morning 😂
@sailendrachettri8521
@sailendrachettri8521 3 жыл бұрын
haha
@chiennguyeninh8026
@chiennguyeninh8026 3 жыл бұрын
Can I style border of row ? , thks
@Codemycom
@Codemycom 3 жыл бұрын
No idea, sorry
@NotBeHaris
@NotBeHaris 3 жыл бұрын
and i am still for django tutorials
@Acem8887
@Acem8887 3 жыл бұрын
Can you please make a discord server so we can ask questions and help each other out? i think that would be epic.
@Codemycom
@Codemycom 3 жыл бұрын
Not my thing...you can ask questions here :-p
@_ARIC_KAJI
@_ARIC_KAJI 3 жыл бұрын
You are the best thanks for reply , somebody I send my msg no one can reply thanks for reply. thanks
@Codemycom
@Codemycom 3 жыл бұрын
Sure thing :-)
@peterviglietta4207
@peterviglietta4207 3 жыл бұрын
All I want in life is to make my column headings bold
@Codemycom
@Codemycom 3 жыл бұрын
Fortune favors the bold 😂
@omgwtfocb
@omgwtfocb 2 жыл бұрын
You can map the Treeview.Heading to use some bold font, for example 'Arial Black'
Striped Treeview Rows - Python Tkinter GUI Tutorial #119
10:26
Codemy.com
Рет қаралды 27 М.
Treeview - Python Tkinter GUI Tutorial #116
20:21
Codemy.com
Рет қаралды 136 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 38 МЛН
БАБУШКИН КОМПОТ В СОЛО
00:23
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 17 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 15 МЛН
Tkinter - Treeview Change Heading Colors
14:02
JobinPy
Рет қаралды 4,3 М.
A Competition for Unreadable Code?
12:33
LaurieWired
Рет қаралды 158 М.
5 Tips To Organize Python Code
12:16
Tech With Tim
Рет қаралды 225 М.
Tkinter Layout Managers - Simple Crash Course
15:43
NeuralNine
Рет қаралды 7 М.
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 798 М.
Using tkinter with classes
28:23
Atlas
Рет қаралды 57 М.
Tkinter - Treeview Get Selected Items
11:43
JobinPy
Рет қаралды 9 М.