[tkinter] question about correct use of validation
> Il 16/01/19 08:51, Peter Otten ha scritto:
>> def make_ui(self):
>> ''' create user interface '''
>> def vcmd(maxlength):
>> return self.parent.register(
>> partial(self.maxlength_validate, maxlength=maxlength)
>> ), "%P"
> ok following your advice and that of Rick in the previous post, I
> developed 2 solutions, one without classes and one with classes. I write
> to you if you need someone:
> self.id1_entry = self.make_entry(self.parent, maxlen=1).pack()
You set all idX_entry attributes to None, as that's what pack() returns.
> apply(Entry.__init__, (self, master), kw)
You can write that in way compatible with Python 3 as
Entry.__init__(self, master, **kw)
> Thank you all