Python Tkinter Tutorial (Part 2): Using Classes for Functionality and Organization

preview_player
Показать описание
In this Python Tkinter Tutorial, we'll explore the importance of using classes when working with Tkinter in Python. While many tutorials introduce classes later on, I believe it's essential to start with them right away to avoid common pitfalls and simplify your code. We'll walk through refactoring a basic Tkinter application to use classes, demonstrating how this approach leads to cleaner, more maintainable code. Whether you're building small apps or planning for larger projects, this video will show you how to organize your GUI applications effectively.

The code from this video can be found at:

Python Classes/Object-Oriented Series:

"If __name__ == __main__" Video:

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:

#Python #TKinter
Рекомендации по теме
Комментарии
Автор

I'm going to be continuing this Tkinter series and also getting into other GUI Frameworks as well. I'm going to have a couple of one-off videos until the next Tkinter one is dropped, but it shouldn't be too long. These other videos will include tutorials on Pathlib, Setting up my new Website, etc. Hope yall find this helpful!

coreyms
Автор

My man is back! I don't want to learn tkinter, but the fact that my guru is back feels so good.

rengavasan
Автор

when I was struggling 6 years ago and wanted to learn programming you were the one I learned Django from. Now I am at a place where I would never have imagined in my life. Thanks for all the help and videos. Love from Pakistan.

meta_ai
Автор

Really great to see you active again Corey. You make excellent tutorials!

ItchyCinderBlock
Автор

Your reasoning in the video resonate with me. Gosh I was bored re-writing my app after seeing the utter mess it was without classes.

Kman
Автор

I'm very glad you are covering classes early in the series. When I first started using Tkinter I knew GUI design should be class based but finding information on the proper way to use Tkinter in a class based way was very difficult. Many tutorials don't even cover using classes...

cgriffin
Автор

Exceptionally good tutorial. You are helping me to understand how this code is actually functioning and working. This is such a massive benefit to the process of how I learn. Thank you for educating superbly and making it both acessable and enjoyable.

mrmagoo-
Автор

I am so happy you are back! You are the best teacher I have ever seen thank you for keeping on YouTube❤❤❤

orntkzm
Автор

Very happy to see this continuing, wish you the best and inspiration for it!

ivolol
Автор

loving it even more after you switched from sublime to vscode

AdityaSingh-oevq
Автор

This is just what I need! I've been planning on creating a ui; putting some scripts for financial analysis and tying them together in a single ui.
Thank you! We always appreciate your efforts, Corey!

goodlack
Автор

Thank you Corey! For me, your one of the best python instructor if not the best out there.

deequi
Автор

gui programming is so clean and perfect with oops.
i am currently doing small login with sessions tokens in python flet gui. once i started writing classes for gui components i needed in separate files, it became easy as i just need to insert an object in the main page's container.

nikhilt
Автор

Live to see your video bcz of lucid n live explanations of complex topics ! Your are the tech Guru !
Expecting this series on taipy or Pyors or tutorials on rust, like more relevant to updated topics in 2024.

SP-dbsh
Автор

Thanks a lot to your django series Corey. Even today when in doubt i always go back to your videos and learn. Requesting if you can do a video on dockers/containers.

sarahdavids
Автор

Can you please create a tutorial for streamlit as well ?

parampatel
Автор

Excellent, as always. Thanks for sharing your knowledge.

davel
Автор

I would love it if in later episodes we'll go over concurrency, like processing a big file, while keeping the ui seperate and responsive.

Solved that issue on my own projects with observers but there must be a better way.

oshriperetz
Автор

Love the way you explain things. I learned most Python basics from you before you went down years ago. Thank god you're back!
I insert the self, mainloop in my class, the fact I use TTKB has no impact:
class ToDoApp(ttkb.Window):
def __init__(self, username):
self.username = username

self.geometry('800x600')
self.minsize(800, 600)
self.title(f'To-Do lijst van {username}- beta 2.0')
self.resizable(False, False)
Main_Layout(self, self.username)
self.mainloop()


class Main_Layout(ttkb.Frame):
def __init__(self, parent, username):
self.rownr = 0
super().__init__(parent, padding=10)
self.username = username

selvammatthys
Автор

Im learning some other stuff right now but if in the future i will need tkinter i will definitely look up your tutorial. Keep the good work 👍 I'm always interested in your videos. W8ing for pathlib.

krzysztof
visit shbcf.ru