+ 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...

26th Feb 2019, 6:19 PM
HonFu
HonFu - avatar
4 Respostas
+ 3
Look into unified modelling langauge (UML)
27th Feb 2019, 9:13 AM
Da2
Da2 - avatar
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.
27th Feb 2019, 11:41 AM
builderdev212
builderdev212 - avatar
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...
27th Feb 2019, 11:44 AM
HonFu
HonFu - avatar
0
Also, if your looking to add new windows then use multiple classes
27th Feb 2019, 12:05 PM
builderdev212
builderdev212 - avatar