6 ms·
Thanks so much for this! I know very little about Tk. Besides antialiasing on a canvas, does antialiasing also work in text in labels, buttons, etc? Can I get
by rer 10y ago
Thanks so much for this! I know very little about Tk.
Besides antialiasing on a canvas, does antialiasing also work in text in labels, buttons, etc? Can I get in Tk all the fonts I can get in a Mac? Is Helvetica there?
Why can't I find on the web screenshots of Tk apps running on Mac OS X? Is the only way to get Tk to look good on a Mac using Tile http://tktable.sourceforge.net/tile/screenshots/macosx.html http://tktable.sourceforge.net/tile/screenshots/macosx.html ?
From what I'm reading now there might be 4 options: Tk, wxWindows, QT, and a custom "thin layer".
- networked 10y agoThe link [5] in my top-level comment plus http://www.tkdocs.com/tutorial/fonts.html http://www.tkdocs.com/tutorial/fonts.html should answer your questions. The former has screenshots of Tk on macOS and discusses how to make it look good there. There is a screenshot of a commercial Mac application built with Tk at http://www.codebykevin.com/portauthority.html http://www.codebykevin.com/portauthority.html. Tile was integrated into Tk with version 8.5 (2007). The Tile button, label, etc. are now built in.
- rer 10y agoThis comment says Tk is limited https://news.ycombinator.com/item?id=12381978 https://news.ycombinator.com/item?id=12381978 You and the GP say it's not. Is there anything Tk can't do? Also a question on fonts. Does Tk make it possible to use webfonts I see on websites?
- networked 10y ago>You and the GP say it's not. But I did not say that. In the reply to the comment you've linked you write that "this thread believes Tk is as good as QT". I am puzzled by this conclusion because I do not see any comparison to Qt at all. Certainly, I didn't want to suggest any with my comments. If you want to know my option on how Tk compares to Qt, I currently believe that, for the most part, they serve different use cases, with some overlap in the middle. Tk is better than Qt in one area (roughly: small-to-medium applications developed by a lone hacker ASAP) and Qt is better than Tk in another (roughly: medium-to-large applications developed by a team on some sort of a schedule). Qt does a lot more than Tk. It comes with more features, e.g., networking abstractions. Compared to it, Tk is limited. Qt looks better, too — much better on *nix. I would not recommend Tk over Qt in the general, catch-all, could-become-a-kitchen-sink-application case. (In fact, working well in the general case seems to be a major selling point for Qt.) If you develop one, chances are you will find yourself wanting to do something that Tk can't. In other words, I would expect a large application to outgrow Tk before it outgrows Qt. I recommended Tk specifically for making a GUI quickly. It is good for prototyping and rapid iteration and has neat widgets like canvas and the text editor that help a lot with that. Tcl with Tk is expressive, so you can do a lot in under 1000 lines of code (toy example: [1]). The Tcl REPL helps more still, as does a great binary deployment story. After the prototype or MVP, once you understand what you want to do better, you may stay with Tk if you decide it suits your needs or switch to something else. >Is there anything Tk can't do? That is a very open-ended question. One thing that comes to mind is integrating with the host platform's accessibility features. Most cross-platform GUI toolkits suck at it. There is a wishlist wiki page [2] that might offer some hints at what other things Tk users find missing. >Does Tk make it possible to use webfonts I see on websites? Not easily. See [3]. [1] https://tcl.wiki/41294 https://tcl.wiki/41294 [2] https://tcl.wiki/4055 https://tcl.wiki/4055 [3] https://www.reddit.com/r/Tcl/comments/456ydh/is_there_a_way_to_load_a_ttf_font_file_and_use_it/ https://www.reddit.com/r/Tcl/comments/456ydh/is_there_a_way_...
- eviltwinskippy 10y agoWhoa, whoa, whao. QT is superior to Tk because of network abstractions? Hello, Tk is part of Tcl, which has a socket layer so sophisticated that its embedded into Cisco routers. Let's keep the discussion between QT people who actually KNOW Tcl/Tk and Tcl/Tk people who actually KNOW QT
- witty_username 10y ago> I recommended Tk specifically for making a GUI quickly. It is good for prototyping and rapid iteration and has neat widgets like canvas and the text editor that help a lot with that. Tcl with Tk is expressive, so you can do a lot in under 1000 lines of code (toy example: [1]). The Tcl REPL helps more still, as does a great binary deployment story. After the prototype or MVP, once you understand what you want to do better, you may stay with Tk if you decide it suits your needs or switch to something else. Actually, I would argue the opposite. I found it easy to create GUIs using Qt Designer and to use connect() to bind functionality together. (Albeit, this was with Python, it might be harder in C++). > widgets like canvas and the text editor Is there something particularly unique in Tk's canvas and text editor?