title: A differen "Drag and Drop" images in Tkinter (Python 3.x)
body: <p>I'm trying to make it possible for my program's user to drag an image from a widget and drop it in another without removing the image from its first position. </p>
  
  <p>I thought on using a <code>TopLevel</code> for this. Upon a click+drag event, a <code>TopLevel</code>, containing the same image, would pop up right above the clicked image on the <code>event.x</code> and <code>event.y</code> position. Then it would change its position along with the mouse and only upon <code>ButtonRelease-1</code> the <code>TopLevel</code> would be destroyed. </p>
  
  <p>If the Button Release event was triggered on the master x and y coordinates corresponding to where is my other widget (in the case, a canvas), then it would trigger a <code>canvas.create_image()</code> using the <code>event.x</code> and <code>event.y</code>.</p>
  
  <p>The problems I'm facing are:</p>
  
  <ol>
  <li><p>Only 1 <code>TopLevel</code> should appear at once, but I had no success limiting it. Several windows overlap as I click and drag the mouse.</p></li>
  <li><p>I can't make <code>Toplevel.geometry</code> use the bound event's x and y positions.</p></li>
  <li><p>How to make the <code>Toplevel</code> display the same image as the user clicked, without magic numbers and variables?</p></li>
  </ol>
  
  <p>Here's my code so far:</p>
  
  <pre><code>class animalImgList():
  
      def __init__(self, a):
          #Constructor
          initX = 75
          initY =  40
  
          animalList = ['pig2.jpg', 'pig3.jpg', 'pig4.jpg']
  
          for a in animalList:
              vars(self)[a+'img'] = PIL.Image.open(a)
  
              vars(self)[a+'tkimg'] = PIL.ImageTk.PhotoImage(vars(self)[a+'img'])
  
              vars(self)[a+'labelName'] = Label(anmlCanvas, image=vars(self)[a+'tkimg'])
              vars(self)[a+'canvasImg'] = anmlCanvas.create_image(initX, initY,image=(vars(self)[a+'tkimg']))
              initY = initY + 70
  
              anmlImgList = []
              anmlImgList.append(vars(self)[a+'canvasImg'])
  
              imgTags = anmlCanvas.addtag_all("img")
              anmlCanvas.tag_bind("img", "&lt;Button-1&gt;", self.createImg)
  
      def createImg(self, event):
  
          newImg = Toplevel(root)
          newImg.geometry("50x40"+"+"+ x+"+"+y)
  
          newImgMsg = Message(newImg, text="This is supposed to be an image")
          newImgMsg.pack()
  
          newImg.update_idletasks()
          newImg.overrideredirect(True)
  
          createImgOpen = True
  
          if createImgOpen == True:
              pass
  </code></pre>