[英]Python Tkinter Set image another window
Hello i have problem with set background image i want set image in another window in tkinter (python) look at def matus()您好,我在设置背景图片时遇到问题,我想在tkinter(python)的另一个窗口中设置图片,请看def matus()
can someone help me idk now anymore..有人现在可以帮助我吗。
this is function for another window...这是另一个窗口的功能...
def matus():
matus = Tk()
matus.title("Nice WIndow")
matus.geometry("400x400")
canvas=Canvas(matus, width = 400, height = 400)
image=ImageTk.PhotoImage(Image.open("fotky/images.jpg"))
canvas.create_image(0,0,anchor=NW,image=image)
canvas.pack()
Hello i have problem with set background image i want set image in another window in tkinter (python) look at def matus()您好,我在设置背景图片时遇到问题,我想在tkinter(python)的另一个窗口中设置图片,请看def matus()
can someone help me idk now anymore..有人现在可以帮助我吗。
this is function for another window...这是另一个窗口的功能...
def matus():
matus = Tk()
matus.title("Nice WIndow")
matus.geometry("400x400")
canvas=Canvas(matus, width = 400, height = 400)
image=ImageTk.PhotoImage(Image.open("fotky/images.jpg"))
canvas.create_image(0,0,anchor=NW,image=image)
canvas.pack()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.