Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tkinter refresh
#1
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.
Reply


Messages In This Thread
Tkinter refresh - by eduardoforo - Nov-13-2018, 08:51 PM
RE: Tkinter refresh - by Larz60+ - Nov-13-2018, 11:27 PM
RE: Tkinter refresh - by woooee - Nov-14-2018, 02:34 AM
RE: Tkinter refresh - by eduardoforo - Nov-14-2018, 03:36 PM
RE: Tkinter refresh - by woooee - Nov-14-2018, 09:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  tkinter - update/refresh treeview snakes 5 21,128 Dec-02-2023, 07:05 PM
Last Post: aynous19
  [PyQt] Refresh x-labels in matplotlib animation widget JohnT 5 3,820 Apr-23-2021, 07:40 PM
Last Post: JohnT
  Refresh image in label after every 1s using simple function jenkins43 1 5,520 Jul-28-2019, 02:49 PM
Last Post: Larz60+
  Unable to update or refresh label text in tkinter jenkins43 3 6,664 Jul-24-2019, 02:09 PM
Last Post: Friend
  [Tkinter] Label doesn't refresh jollydragon 7 7,028 Jul-13-2018, 05:55 AM
Last Post: jollydragon
  [PyQt] enviremont refresh duende 2 3,453 May-13-2018, 09:49 AM
Last Post: duende
  pyqt main window refresh poblems duende 0 5,396 Apr-13-2018, 05:05 PM
Last Post: duende
  Refresh test in urwid.Text Stensborg 1 4,564 Mar-05-2018, 11:23 AM
Last Post: Stensborg
  [Tkinter] problem with refresh UI in tkinter app Philbot 5 10,898 Feb-06-2018, 01:10 PM
Last Post: Philbot
  How Can I Do Refresh Window? satrancali 0 7,107 Feb-03-2018, 07:50 AM
Last Post: satrancali

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020