title: Get combobox value in python
body: <p>I'm developing an easy program and I need to get the value from a <code>Combobox</code>. It is easy when the <code>Combobox</code> is in the first created window but for example if I have two windows and the <code>Combobox</code> is in the second, I am not able read the value from that.</p>
  <p>For example :</p>
  <pre><code>from tkinter import *
  from tkinter import ttk
  
  def comando():
      print(box_value.get())
  
  parent = Tk() #first created window
  ciao=Tk()     #second created window
  box_value=StringVar()
  coltbox = ttk.Combobox(ciao, textvariable=box_value, state='readonly')
  coltbox[&quot;values&quot;] = [&quot;prova&quot;,&quot;ciao&quot;,&quot;come&quot;,&quot;stai&quot;]
  coltbox.current(0)
  coltbox.grid(row=0)
  Button(ciao,text=&quot;Salva&quot;, command=comando, width=20).grid(row=1)
  mainloop()
  </code></pre>
  <p>If I change the parent of the widget from <code>ciao</code> to parent it works!
  Can anyone explain me?</p>