title: How to set focus for Tkinter widget?
body: <p>I have a simple Python + Tkinter application that displays a list of 10 items:</p>
  
  <pre><code>import Tkinter, ttk
  list = ttk.Treeview( Tkinter.Tk() )
  list.pack( fill = Tkinter.BOTH, expand = 1 )
  items = [ list.insert( '', 'end', text = str( i ) ) for i in range( 10 ) ]
  list.selection_set( items[ 0 ] )
  list.focus_set() # This is not working - list has no focus :(
  Tkinter.mainloop()
  </code></pre>
  
  <p>Is it possible to modify it so after application starts, list will have focus and i can move selection via up and down arrows? After app starts, app's window has focus, but i can't move selection with arrows until i click list with mouse :(. I tried different combinations of <code>focus_set()</code> and <code>focus_force()</code>, but it's not working.</p>
  
  <p>Checked with Python 2.7 on Windows 7, OSX 10.7 and Ubuntu 12.04</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>If "Treeview" is changed to some other widget, for example to "Button", the focus is working. So it's seems that i set focus for Treeview somehow incorrectly.</p>