Skip to main content

Posts

Featured

Working With Multiple Windows

tkinter tutorial is a library in python for GUI(Graphical User Interface). It is used to create GUI for the application . In this video we will learn how to open new window on button click or working with multiple windows. If you use IDLE then you have to use mainloop() function. But If you use any IDE like pycharm, there are no need to use mainloop() function. Code: from tkinter import * def my_window():     top=Toplevel()     btn1=Button(top,text="close",command=top.destroy)     btn1.pack()     top.geometry("300x300") root=Tk() btn=Button(root,text="open",command=my_window) #btn=Button(root,text="open") btn.pack() root.geometry("400x400") root.mainloop()

Latest posts