“Chamando uma função em python após a entrada de conteúdo alterando tknter” Respostas de código

Chamando uma função em python após a entrada de conteúdo alterando tknter

from tkinter import *

root = Tk()
sv = StringVar()

def callback():
    print(sv.get())
    return True

e = Entry(root, textvariable=sv, validate="focusout", validatecommand=callback)
e.grid()
e = Entry(root)
e.grid()
root.mainloop()
Muddy Magpie

Chamando uma função em python após a entrada de conteúdo alterando tknter

sv.trace_add("write", callback)
Muddy Magpie

Chamando uma função em python após a entrada de conteúdo alterando tknter

from Tkinter import *

def callback(sv):
    print sv.get()

root = Tk()
sv = StringVar()
sv.trace("w", lambda name, index, mode, sv=sv: callback(sv))
e = Entry(root, textvariable=sv)
e.pack()
root.mainloop()  
Muddy Magpie

Respostas semelhantes a “Chamando uma função em python após a entrada de conteúdo alterando tknter”

Perguntas semelhantes a “Chamando uma função em python após a entrada de conteúdo alterando tknter”

Mais respostas relacionadas para “Chamando uma função em python após a entrada de conteúdo alterando tknter” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código