0
は私がのFileDialogからファイルを選択しようとしていると画像がGUIに示されている次の3つのステップで行うことができます達成したい何Python 3 - Tcl/Tk filedialogからイメージを取得して表示するには?
def onOpen():
""" Ask the user to choose a file and change the update the value of photo"""
photo= get(filedialog.askopenfilename())
photo2 = PhotoImage(filedialog=photo)
#how do I get photo2 to work and get button to display the picture?
button = Button(root, image=photo2, text="click here", command=onOpen).grid()
root.mainloop()