Nov-13-2018, 08:51 PM
def selmunicipio(): top = tk.Toplevel() top.title("Selección de Municipio") y=1 for i in listamunicipios: y+=1 if y<=30: tk.Radiobutton(top,text=i,variable=municipio,value=i).grid(row=y, column=0, sticky='w') else: tk.Radiobutton(top,text=i,variable=municipio,value=i).grid(row=y-29, column=1, sticky='w') button = tk.Button(top, text="Elige y pulsa aquí", command=top.destroy) button.grid(row=1, column=0) tk.Entry(raiz, textvariable=municipio, validate='focus', validatecommand=selmunicipio).grid(row=11, column=1, sticky='w,e', padx=5, pady=5)When I focus on the Entry, a window is displayed, I choose an option, I press a button and it appears in the Entry.
But once the operation is done, when I return to focus, the window does no appears again.
How can I restart the Entry?
Thanks.