Mar-14-2022, 01:01 PM
I am developing a multi-window system using Python and tkinter. Though I am, in no way, new to programming (or Python) this aspect is new to me. Previously, when developing multi-window systems I have developed using interfaces such as Visual Studio, etc.
I have undertaken two potential experiments. One where each window is defined within it's own file, as a series of functions (dealing with events, etc), all held together via a single main file. The other is by building each window as a class, then using this within the main file.
At this point I cannot see any considerable issue with either approach; though I seem to find that, due tohaving independent imports of tkinter, the class methodology results in windows that are always independent of eachother; so I cannot yet get the main window to close all other, open windows (I feel this is something I should be able to define as a closing function).
Sorry for the vagueness but before I go down a terrible rabbit hole, is there a preferred option that those with experience would recommend? Is it one of the two I have opted for, or is there a third one? Or does this purely come down to personal preferences?
I have undertaken two potential experiments. One where each window is defined within it's own file, as a series of functions (dealing with events, etc), all held together via a single main file. The other is by building each window as a class, then using this within the main file.
At this point I cannot see any considerable issue with either approach; though I seem to find that, due tohaving independent imports of tkinter, the class methodology results in windows that are always independent of eachother; so I cannot yet get the main window to close all other, open windows (I feel this is something I should be able to define as a closing function).
Sorry for the vagueness but before I go down a terrible rabbit hole, is there a preferred option that those with experience would recommend? Is it one of the two I have opted for, or is there a third one? Or does this purely come down to personal preferences?