How to make Popup Window with Python Tkinter - Basic GUI #6

How to make Popup Window with Python Tkinter - Basic GUI #6

StudyWithMe

3 года назад

14,526 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

im bivgives
im bivgives - 08.09.2023 12:38

i have a question,how can i make it close multiple window?

Ответить
Flying Dragon
Flying Dragon - 05.04.2023 22:58

Thank u man

Ответить
Balaji Verma.
Balaji Verma. - 27.05.2022 21:41

Very nicely written, but i have a doubt, in button of main window, in the command section, you give command=popup (Calling function)
But, so far i know, to call a function, we must put a parenthesis after that, like
Command=popup()

Ответить
Kawiurka
Kawiurka - 25.03.2022 19:44

I really like your short films :) can we have some more videos wiht tkinter series?

Ответить
RedCauldron
RedCauldron - 22.02.2022 13:55

from curses import window
from tkinter import Button, Label, Tk, Toplevel


window = Tk()
window.title("Main Window")
window.geometry("300x300")

def popup():
popupwindow = Toplevel(window)
popupwindow.title("Alert")
popupwindow.geometry("200x100")
alert = Label(popupwindow, text = "Is it right?")
button1 = Button(popupwindow, text = "Ok", command = popupwindow.destroy)
alert.pack()
button1.pack()
popupwindow.mainloop()

button = Button(window, text = "Open", command = popup)
button.pack()

window.mainloop()

Ответить
plyea
plyea - 27.11.2021 13:49

Please make more videos to the Tkinter series!

Ответить
Abdul wahid Choudhury
Abdul wahid Choudhury - 02.07.2021 03:03

Can you put the whole code in the comments

Ответить