osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tkinter] question about correct use of validation


Il 17/01/19 14:08, Peter Otten ha scritto:

> Two remarks:
> 
>>           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.

you mean..

self.idx_entry = self.make_entry(self.parent, width=50, maxlen=30, 
highlightcolor='blue', validate='key') ?

or

self.idx_entry.pack() ?

I did not understand :-D

> 
>>           apply(Entry.__init__, (self, master), kw)
> 
> You can write that in way compatible with Python 3 as
> 
>             Entry.__init__(self, master, **kw)
> 

Ok this i understood