Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import Entry, StringVar, TOP
- class traceEntry(Entry):
- def __init__(self, master, **kwargs):
- self.var = StringVar()
- trace = None
- if 'trace' in kwargs.keys():
- trace= kwargs['trace']
- del kwargs['trace']
- kwargs['textvariable'] = self.var
- Entry.__init__(*(self, master), **kwargs)
- if traceis not None:
- self.var.trace('w', command=trace)
- def get(self):
- return self.var.get()
- myentrys = {}
- for i in range(100):
- myentries["e%s"%i] = traceEntry(root, trace=check)
- myentries["e%s"%i].pack(side=TOP)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement