title: Why does tkinter's Entry.xview_moveto fail?
body: <p>I'm working with tkinter on Python 3.4.1 (Windows 7), and I'm finding that ttk's Entry.xview_moveto function is not working properly. Here is some simple code:</p>
  
  <pre><code>from tkinter import *
  from tkinter import ttk
  
  a = Tk()
  text = StringVar(a, value='qwertyuiopasdfghjklzxcvbnm1234567890')
  b = ttk.Entry(a, textvariable=text)
  b.grid()
  b.xview_moveto(1)
  </code></pre>
  
  <p>The xview_moveto function should scroll the text all the way to the left, but it doesn't. However, I noticed that if I use</p>
  
  <pre><code>b.after(500, b.xview_moveto, 1)
  </code></pre>
  
  <p>it works just fine. Why do I have to delay the function call in order for it to work properly? Am I doing something wrong?</p>
  
  <p><strong>Update</strong>: In addition to fhdrsdg's solution, I have found that the <code>Entry.after_idle</code> method works for my program. It does not seem to work for the above simple example, but if anybody else has the same problem as me, this could be another, cleaner-looking solution.</p>