Answers for "pop up window example"

2

make a pop up window in python

from tkinter import *

def alert_popup(title, message, path):
    """Generate a pop-up window for special messages."""
    root = Tk()
    root.title(title)
    w = 400     # popup window width
    h = 200     # popup window height
    sw = root.winfo_screenwidth()
    sh = root.winfo_screenheight()
    x = (sw - w)/2
    y = (sh - h)/2
    root.geometry('%dx%d+%d+%d' % (w, h, x, y))
    m = message
    m += '\n'
    m += path
    w = Label(root, text=m, width=120, height=10)
    w.pack()
    b = Button(root, text="OK", command=root.destroy, width=10)
    b.pack()
    mainloop()
Posted by: Guest on October-25-2020
0

windows pop up

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
</head>
<body>
<button onclick = 'f=window.open("URL,exampe - google.com","fenetre","the style (without style tag, example - width=400, height=600, no px")'style="cursor: pointer;">pop up</button>
</body>
</html>
Posted by: Guest on June-23-2021

Browse Popular Code Answers by Language