This video will cover how to create complex tkinter layouts using all the layout methods (pack + grid + place) along with classes to organise them well. Code: github.com/clear-code-project...
Bro, this is amazing! One of the best well-explained videos on class-based apps. I am using this approach, but do have doubts sometimes on how to organize the code properly. Thank you for making this easier!
Standing ovation, Sir!👏 I have watched all these (your) videos from the first one and will continue to the last one (#40) because they are so good! My deepest congratulations, inspiring!
wooow I can't speak, before this video I had a lot of problems understanding the classes, and I had no idea how and why should I use them but know you opened my mind and make me see their importance and make me understand them easily.... thank you very much from all my heart ❤ .
Thank you, this is superb. Very clearly explained, and exactly what i was looking for. The only difficulty I had was that many of my labels have text that changes as part of the program, so I had to call mainloop using the object (instance), rather than from within the class constructor. I can't see any way around that, but if anyone reading this has any thoughts I'd love to hear them. Thanks again for such a clear and detailed explanation.
Very clear and easy to understand videos, easiest I have found to follow and comprehend. Would you continue with the series by adding commands to the buttons and then splitting the parts into separate modules or .py files. I am trying to create a sqlite database app with a lot of tables and table editing windows but am struggling as it gets too complex and I have been unable to split the modules while maintaining functionality. It a model train/Item inventory database Thank you for your videos!
Yes. I was wondering if he would create a video with the OOP approach but with functioning buttons next time. Here it is mainly just creating and placing widgets
It works perfectly on Windows 7 but the red label will not display on Linux Mint 20.3 My mistake! In the class Menu(ttk.Frame): Def __init__(self, parent): I entered __init__ as __int__ This occurred using one of the built-in features of PyCharm. An easy mistake to make, but not easy to spot (with my eyesight). Many thanks for the videos!
Not sure if you care anymore haha but my guess was that rather than creating and packing each button and label you're able to do that once, and then create 2 (or more) instances of it. Like let's say instead of 2 label/button pairs he wanted 10. If he didn't create the class, he would have to write all the ttk.Label and ttk.Button and the packing code out 10 different times. Whereas with the class, he adds the Label/Button and .pack() code only once, and then just creates 10 instances of it.
Why do you prefer class inheritence instead of composition, is there any reason that I don't know yet? I ask this question, because all component based web applications construct their components via composition further I know how difficult to maintain inheritence based approach from ancient MFC applications. But all OO tkinter courses prefer class inheritence, maybe there is a good reason? Consider how difficult to switch from Tkinter to CustomTkinter if you prefer class inheritence.
I did it differently and it worked: from tkinter import * class App(Tk): .... class Menu(Frame): ..... And for widgets: Button() not ttk.Button Label() not ttk.Label() Is it okay or can various problems/conflicts appear in the development of an application?
I have been following the video but I didn't see any colours, so I downloaded and copy-pasted your code and everything displays except the colours. What could my error be? macbook pro late 2012 running macos big sur
My man, I am stuck on something, Since "Menu" class is somehow unrelated to the "Main" Class but instead share a common super class "App", i want a button on the "Menu" Class to call a method on the "Main" class, how do I do That since Main is not a child of Menu? Thanks for this amazing video!!
sir i have a question, i need to make buttons which can bring frames in the parent frame. means when we press the button we show frame, and further place buttons in that frame, to bring more frame. i cannot achieve this approach. please upload this kind of tutorial
sir, GoogMorning, i'm very beginner to Python you are explaining passing tk.Tk as argument in the Class App(tk.Tk) and you are passing self i.,e, tk.Tk, into menu = Menu(self) here self = tk.Tk ??, but in Class Menu(ttk.Frame), the constructor of Menu is def__init__(self, parent) i'm confusing, in class Menu(ttk.Frame) the argument should be tk.Tk how the ttk.Frame will come, in java not like this, can you clarify??