[tkinter] question about correct use of validation

steve stefano at stalksoft-Invalid-.Com
Thu Jan 17 17:05:20 EST 2019


>> Il 17/01/19 14:08, Peter Otten ha scritto:
> Alternatives:
> 
> - If you know that you'll always just call pack() you can change the
> make_entry() method accordingly
> 
> def make_entry(...):
>      ...
>      entry.pack()
>      return entry
> 
> 
> - Write a helper function
> 
> def pack(widget):
>      widget.pack()
>      return widget
> 
> and then use it
> 
> self.id1_entry = pack(self.make_entry(...))  # create and layout widget
> 
> 

it's true! they are important things that make the difference and help 
in understanding.

Thanks a lot of support ;-)



More information about the Python-list mailing list