Folder structure question. #574
-
Hello! So I want to structure my code into different files(frames into file, buttons into file, etc).
./src./app.py
The problem is that, it runs the frames.py as a separate app. 2022-10-31.19-02-37.mp4First run - with code above, second run - normal code, one file, no importing. What do I need help with? Structure different things into different folders(buttons, labels, frames). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I created two articles in the wiki on how to structure the code into classes: The classes can then be located in individual files, and you can have a main.py file where the App class is implemented and then for example a module (folder with init.py file) called frames where all files with the frame classes are located. |
Beta Was this translation helpful? Give feedback.
I created two articles in the wiki on how to structure the code into classes:
https://github.com/TomSchimansky/CustomTkinter/wiki/App-structure-and-layout
https://github.com/TomSchimansky/CustomTkinter/wiki/Multiple-frames
The classes can then be located in individual files, and you can have a main.py file where the App class is implemented and then for example a module (folder with init.py file) called frames where all files with the frame classes are located.