from tkinter import *
#creating window
root = Tk()
root.title("Press Me")
button1 = Button(root, text="Press Me") #creating button
button1.pack()
import ctypes #creating message box
MessageBox = ctypes.windll.user32.MessageBoxW
MessageBox(None, 'Hi!', 'Waiting', 0)
root.mainloop()
from tkinter import *
root = []
#creating windows
for x in range(0,10):
root.append(Tk())
root[x].title("Press Me")
button1 = Button(root[x], text="Press Me") #creating button
button1.pack()
import ctypes #creating message box
MessageBox = ctypes.windll.user32.MessageBoxW
MessageBox(None, 'Hi!', 'Waiting', 0)
from tkinter import *
class Example(Frame):
def __init__(self, parent):
Frame.__init__(self, parent)
self.display = Canvas(self, width=700, height=200)
self.display.pack(side="top", fill="both", expand=True)
if __name__ == "__main__":
root = Tk()
root.title("Title")
Frame = Example(parent=root)
Frame.pack(side="top", fill="both", expand=True)
root.mainloop()