tkinter的简单使用

185 阅读1分钟
import tkinter as tk

splash = tk.Tk()
splash.title("test")
splash.geometry("1000x700")
splash.resizable(False, False)

label = tk.Label(splash, text="this is a interesting picture",
                 bg='white', font=('Arial', 12), width=110, height=3)
label.pack()

img = tk.PhotoImage(file="D:/000.png")

canvas = tk.Canvas(splash, width=1000, height=700)
canvas.create_image(0, 0, anchor=tk.NW, image=img)
canvas.pack()

tk.mainloop()