title: tkinter: why does this movable label move when i don't move it?
body: <p>i have a moveable label. its position is read from a txt file and wrote to txt file when it was changed by dragging. 
  but the position of the label changes when i don't drag it, just by running the snippet.</p>
  
  <p>i tried it with multiple labels and found out that each time i run the snippet the x and y of every single moveable label increment with the same number.</p>
  
  <pre><code>import tkinter as tk
  
  def make_draggable(widget):
      widget.bind("&lt;Button-1&gt;", on_drag_start)
      widget.bind("&lt;B1-Motion&gt;", on_drag_motion)
  
  def on_drag_start(event):
      widget = event.widget
      widget._drag_start_x = event.x
      widget._drag_start_y = event.y
  
  def on_drag_motion(event):
      widget = event.widget
      x = widget.winfo_x() - widget._drag_start_x + event.x
      y = widget.winfo_y() - widget._drag_start_y + event.y
      widget.place(x=x, y=y)
  
  def get_new_positions():
      x, y = label1.winfo_rootx(), label1.winfo_rooty()
      positions["moveable_label"] = (x, y)
  
  
      dictfile = open("labelposition.txt", "w")   # save new positions
      dictfile.write(str(positions))
      dictfile.close()
  
  def close_window():
      main.destroy()
  
  root = tk.Tk()
  root.geometry('1200x900')
  
  tk.Label(root, text="test").pack()
  
  
  root.withdraw()
  
  # start window
  aWindow = tk.Toplevel(root)
  aWindow.geometry('1200x900')
  
  def change_window():
      # call function which reads the y coordinates
      aWindow.update()
      get_new_positions()
      #remove the other window entirely
      aWindow.destroy()
  
      #make root visible again
      root.iconify()
      root.deiconify()
  
  tk.Button(aWindow, text="OK", command=change_window).pack()
  
  # load dict with label positions
  
  dictfile = open("labelposition.txt", "r")
  positions = eval(dictfile.read())  # load label positions
  dictfile.close()
  
  # position label
  
  label1 = tk.Label(aWindow, text="moveable")
  label1.place(x=positions["moveable_label"][0], y=positions["moveable_label"][1])
  make_draggable(label1)
  
  root.mainloop()
  </code></pre>
  
  <p>The goal of my code snippet should be:</p>
  
  <ol>
  <li>show a moveable label and position it according to the x y data saved in a txt file.</li>
  <li>if the label is moved to another position with the mouse and the ok button is klicked, the new x y position is saved to the txt file.</li>
  <li>a new empty page opens</li>
  </ol>
  
  <p>but: when i run the snippet multiple times without touching the label with the mouse, the label position changes its position every time anyway (x and y get higher)</p>
  
  <p>can you see where this x y change comes from?</p>