Sep-26-2020, 04:48 PM
(This post was last modified: Sep-26-2020, 04:48 PM by deanhystad.)
Tk() creates the tkinter application and returns a window. You cannot call Tk twice because this messes up the application. Other GUI toolkits do a better job separating windows from application.
If you want multiple windows in a tkinter application you call Tk() once and then create more windows using TopLevel.
Creating multiple top level windows for an application is generally frowned upon and is considered bad design. You should consider making one window with multiple frames.
If you want multiple windows in a tkinter application you call Tk() once and then create more windows using TopLevel.
Creating multiple top level windows for an application is generally frowned upon and is considered bad design. You should consider making one window with multiple frames.