title: How to use user input to display image?
body: <p>How do I use user input to retrieve an image, and display it on the screen? I have the user input field in Tkinter, and I do not know how to get that to go to my folder, and get the image to show up on the same screen.</p>
  <p><strong>EDIT:</strong> I was able to get the path to show on the screen, but now I don't know how to get the actual image to show up from that path inside the frame... I do not know how to link this path to have the program display the image, i.e. <code>myimage1</code> from my folder.</p>
  <pre><code>from tkinter import *
  from PIL import ImageTk,Image
  from tkinter import ttk
  from tkinter import filedialog
  
  root = Tk()
  root.title(&quot;Images&quot;)
  root.iconbitmap(r'C:\Users\hadhikari\example\Takumi_Logo.ico')
  
  button_quit = Button(root, text= &quot;Exit Program&quot;, command=root.quit)
  button_quit.pack()
  
  e= Entry(root, width=50, bg=&quot;light blue&quot;, borderwidth=3)
  e.pack()
  e.insert(0,&quot; &quot;)
  
  
  def myClick():
      link = &quot;r'C:\\Users\\hadhikari\\example\\&quot; + e.get()
      myLabel1 = Label(root, text=link)
      myLabel1.pack()
  
  
  myButton = Button(root, text=&quot;Scan Part Number&quot;, command=myClick, 
  bg=&quot;pink&quot;, fg=&quot;white&quot;)
  myButton.pack()
  
  #my_img = ImageTk.PhotoImage(Image.open('link'))
  #my_Label = Label(image=my_img)
  #my_Label.pack()
  
  #def getText():                                                         
  #    inputtedtext = entrybox.get()
  
  #entrybox = Entry(root)
  #entrybox.pack()
  
  #btn = Button(root, text=&quot;Submit&quot;, command=getText)
  #btn.pack()
  
  frame = LabelFrame(root, padx=100, pady=100)
  frame.pack(padx=50, pady=50)
  
  root.mainloop()
  </code></pre>