#!python # -*- mode: python; Encoding: utf-8; coding: utf-8 -*- # Last updated: <2023/06/07 20:12:09 +0900> """ Show MessageBox use tkinter Windows10 x64 21H1 + Python 3.10.10 64bit + tkinter """ import tkinter as tk text = "This message is temporary.\nIt is displayed using tkinter's root." title = "Title" root = tk.Tk() lbl = tk.Label(root, text=text, font=("Consolas", 20), justify="left") lbl.pack() btn = tk.Button(root, text="OK", command=root.destroy, font=("Consolas", 14)) btn.pack() root.mainloop()