title: Python tkinter creating object on canvas
body: <p>I'm new to python and trying to design a GUI for a simulator using tkinter.</p>
  
  <p>My issue is that I need to create an object image onto a canvas from clicking of a button and must be able to drag around the canvas area.</p>
  
  <p>However, currently I am only able to create an image onto the canvas and unable to drag</p>
  
  <p>Here is my partial codes:</p>
  
  <pre><code>from tkinter import *
  def show_train():
       canvas.create_image(30,30, image=image1)
  root = Tk()
  canvas = Canvas(iframe5, height=600, width=520, bg="white")
  image1 = PhotoImage(file='train.png')
  b1=Button(frame,justify=LEFT)
  b1.config(image=image1,width="80",height="80", command=show_train)
  b1.pack(side=LEFT)
  b1.place(x=0, y=12)
  canvas.pack(side=RIGHT, expand=True)
  root.mainloop()
  </code></pre>
  
  <p>any kind soul?
  Thanks in advance</p>