+ 1
How to design program flow in a GUI?
I am new to tkinter and GUI in general. I basically get how to create and pack stuff and add functionality to it, but I am wondering how to best structure the code when the functionality changes at runtime. Is it stylewise okay/normal to create and destroy widgets in a window determined by the program flow, or should I better open a new window when a program enters a new phase? How to decide when to use which way? I am looking for a few general principles here to guide my way...
4 Réponses
+ 3
Look into unified modelling langauge (UML)
0
Well, for python tkinter is a good start, but personally i use kivy when build GUI's since it has a better veiw, but tkinter is more user friendly. To answer your first question, the best way to structure your code with any GUI is inside a class.
0
My problem is not with which framework to use or about OOP in general.
I am wondering how to write such code properly, how to decide if I should (examples):
1.) recycle a widget for a different use,
2.) destroy and create widgets on the fly when functionality changes,
3.) create or destroy new windows or keep using the old one...
So design-issues basically.
I'm sure there must be typical standard solutions, best practices and stuff like that...
0
Also, if your looking to add new windows then use multiple classes