[Tutor] Tkinter, the correct way

Phil phillor9 at gmail.com
Fri Feb 10 17:08:23 EST 2023


On 11/2/23 01:40, Alan Gauld via Tutor wrote:
> On 10/02/2023 09:00, Phil wrote:
>
>> Is this code the correct modern way?
> There is no such thing. Thre are many styles of tkinter programming.
> "Correctness" is largely subjective (assuming the code works of course!)

Thank you Alan,

I'd developed a template for this type of thing quite awhile ago and I 
think I'll continue using that. Interestingly, ChatGPT generated code 
that is similar to my template although the generated scale example was 
not correct.

I have spent quite some time looking for ttk scale examples, reading ttk 
documentation and I even bought an e-book. The book doesn't cover the 
use of the scale widget. Perhaps the scale widget is not commonly used?

The author of the book discourages the use of the pack manager, instead 
favours the grid manager. I've tried both and I think I find the pack 
manager easier to use. I wonder if I should put more effort into 
learning to use the grid manager?

Anyway, thank you again Alan for you thoughts.

-- 

Regards,
Phil



More information about the Tutor mailing list