Books on the Finer Points of Tkinter
2 comments
tkinter is a Python wrapper around Tk:
I would recommend learning Tk and the details of how tkinter wraps Tk https://en.wikipedia.org/wiki/Tk_(software)
These resources might help:
https://www.tcl.tk/
https://tkdocs.com/
https://tkdocs.com/book.html
I would recommend learning Tk and the details of how tkinter wraps Tk https://en.wikipedia.org/wiki/Tk_(software)
These resources might help:
https://www.tcl.tk/
https://tkdocs.com/
https://tkdocs.com/book.html
Yeah but Tcl... is it worth it?
Also the tkdocs book is one of the books I reviewed, 3rd edition. The only mention of bindtags is a reference to the tkdocs website, which only documents the four default tags but not much else, which in turn references the Tk manual, which is hard to read as I don't understand Tcl.
Also the tkdocs book is one of the books I reviewed, 3rd edition. The only mention of bindtags is a reference to the tkdocs website, which only documents the four default tags but not much else, which in turn references the Tk manual, which is hard to read as I don't understand Tcl.
As you stated above: "I really like tkinter and want to commit to it".
>> Yeah but Tcl... is it worth it?
That is for you to decide.
>> Yeah but Tcl... is it worth it?
That is for you to decide.
I don't understand Tcl
Yet.
Yet.
As others have pointed out, tkinter is just a wrapper around Tk, so the best way to learn more about it is to learn about Tk. The documentation for Tk [1] is fairly comprehensive: for example, the algorithm used by the `pack` command that you asked about is explained here: [2].
It's definitely worth learning at least some very basic Tcl if you want to get as much as possible out of tkinter - sometimes you end up having to use `widget.tk.eval()` to use a Tk feature that tkinter doesn't provide a good wrapper for.
[1] https://www.tcl.tk/man/tcl/TkCmd/contents.html [2] https://www.tcl.tk/man/tcl/TkCmd/pack.htm#M27
It's definitely worth learning at least some very basic Tcl if you want to get as much as possible out of tkinter - sometimes you end up having to use `widget.tk.eval()` to use a Tk feature that tkinter doesn't provide a good wrapper for.
[1] https://www.tcl.tk/man/tcl/TkCmd/contents.html [2] https://www.tcl.tk/man/tcl/TkCmd/pack.htm#M27
Contrast with gtk in C and Python which I used to do many years ago. I never found it fun like tkinter but the docs were pretty good. Great high level conceptual overview, not so great on widget details, and very little on design practices. Contrast with tkinter in which there are millions of ways for encapsulating widgets into classes.
As for QT, I've bounced off that every time I've tried to pick it up.
My point is, I really like tkinter and want to commit to it, with some help.