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.
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()

Hello sir I want to learn tkinter can you share your contact no to discuss or mailed me
ReplyDelete