Software

Tk is my favorite GUI toolkit

Cross-platform user interface stays fresh

November 11, 2009, 02:23 PM — 

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

I like it!
Comments

Tk's "tile" is a major enhancement with native/styled look

It's called "Tile" and ships with 8.5 and 8.6
http://wiki.tcl.tk/tile
| reply
peer-to-peer

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?

sjvn
64-bits of protection?

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

The Daily Tip

The Daily TipQuick, practical advice for IT pros. Made fresh daily.

Hot tips:

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.

Newsletters

Subscribe to ITWORLD TODAY and receive the latest IT news and analysis.

I would like to receive offers via email from ITworld partners.
By clicking submit you agree to the terms and conditions outlined in ITworld's privacy policy.
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace