Tk is my favorite GUI toolkit
Cross-platform user interface stays fresh
I like to program graphical user interfaces (GUIs) with Tk; it's one of my two favorite GUI toolkits. I'll give several tips about GUI construction with Tk. I suspect at last some of this will apply to you. Next week, "Smart Development" will do the same for my other favorite GUI toolkit.
Understand, first, that a posting like this can achieve no more than a few tips. As much as I appreciate clarity and simplicity, a majority of the writing on programming that people apparently find persuasive is woefully truncated. Look, for a quick example, at Tk 8.5 is better than wxWidgets on Windows". Author BIOSPUD writes well, in that he clearly explains himself: he explains his focus on cross-platform capabilities (where Tk does indeed shine), he lucidly describes the dimensions along which he compares Tk, Swing, and wxWindows, he specifies crucial details (such as release number), and so on.
And he still covers only a small fraction of what there is to know. My impression of BIOSPUD is that he's aware of this. I've heard readers react to such articles, though, and they seem to internalize a post like his as, "Tk roolz!", without recognition that:
- the comparison doesn't touch on such important toolkits as Qt, GTK, and .NET;
- Tk has already moved on to 8.6 for production, wxWidgets has development snapshots at 2.9.0, and so on;
- there's no discussion of performance or features;
- there's little mention of the compatibility of the toolkits with different languages;
and so on. Modern toolkits are big, highly-evolved constructions, essentially all of which embed at least a decade of experience. Even full-length books--an outstanding one on Tcl/Tk just hit the bookshelves--can cover only a fraction of what there is to know.
The conclusion? Choice of a GUI toolkit is complex. Every toolkit has a lot to recommend it, and every one has defects. You're only deceiving yourself if you think you've found the absolute best. What we can do, though, is talk meaningfully about the situations where different ones shine, and how to make the best use of each toolkit in different circumstances.
While I'm not surprised that Tk correctly handles the font measurements BIOSPUD describes, I certainly wasn't aware of the specific comparison that seems so important to him.
Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world
Esther Schindler
If the comments are ugly, the code is ugly
claird
SVG a graphics format for 21st century
pasmith
Take Chrome OS for a test spin
Sandra Henry-Stocker
Solaris Tip: Have Your Files Changed Since Installation?
jfruh
Android fragments vs. the iPhone monolith
mikelgan
What Gizmodo missed about the Pro WX Wireless USB disk drive
Sidekick: The Good News & the Bad News
Either way you look at it Microsoft Data Center management did not follow standards or best practices in this failure. In which case it makes me wonder more about the outsourcing of corporate data much less personal data.
- mburton325
Join the conversation here
Quick, practical advice for IT pros. Made fresh daily.
Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.














Tk's "tile" is a major enhancement with native/styled look
It's called "Tile" and ships with 8.5 and 8.6http://wiki.tcl.tk/tile