34

Tk GUI's seem to be universally considered ugly, but I'd like to know why specifically. Some in the Tcl/Tk world would argue that this is a moot point as there is much better support now for native look and feel, which is a big reason I decided on Tcl/Tk. Now, however, the problem is, because I'm leveraging a Tcl/Starkit vfs (virtual file system), the native file dialogs don't work, and I'm going to have to revert to pure Tk file dialogs.

Please I'm looking for specific, technical reasons, e.g. regarding font aliasing (or lack thereof) or font style, or color, etcetera. Because I personally don't buy the "it's just ugly to me". To me, its just different, and I switch between Mac and Windows and Linux with regularity, so I'm used to different looks/feels.

Specifically, motif-ish look of a traditional Tk GUI is regarded as ugly:

Tcl/Tk GUI Sample

8
  • 30
    Now I see why they say that "a picture is worth a thousand words" :)
    – OscarRyz
    Commented Dec 9, 2008 at 3:27
  • For me, the most obvious specific glitch in many Tk programs is the fat menu bar. Commented Oct 5, 2011 at 23:36
  • The menu bar is the only thing which looks native.
    – Lothar
    Commented Feb 5, 2012 at 7:34
  • @Mechanicalsnail: Could you post back a link to an image that shows something that is not a fat menu bar, for comparison?
    – bgoodr
    Commented May 12, 2012 at 14:08
  • 5
    @bgoodr: Here's a Tk app (Gitk), alongside a Qt app (KWrite) and a GTK+ app (Leafpad), running under KDE. Commented May 15, 2012 at 1:06

8 Answers 8

56

I think part of the reason is that Tk is surprisingly powerful and easy to use but it doesn't do much hand-holding. Since it is so easy, people with little experience in UI design can get something to work in very short order. But, without a lot of experience they rely on defaults and shortest-path-to-a-solution (read: don't take time to hide scrollbars when they aren't needed, don't use common idioms for toolbars, don't properly align widgets, etc).

Unfortunately, Tk's defaults aren't always the prettiest. As the screenshot in the question shows, the default uses relatively thick border widths and suboptimal fonts, and the checkboxes are indeed straight out of the 80's. In the hands of an expert, though, all these problems are minor issues that can be take care of in idle moments.

For example, with five minutes of tweaking, the original screenshot can look like this:

slightly improved ui

Certainly that's still a bit clunky looking, but arguably it's better than the original by a considerable bit. With an hour dedicated to the task, several more improvements could be made.

With tk 8.5 (and actually for a couple years prior) there is support for themes and for native widgets, and even the X11 version gets a minor facelift. Tk is still behind the curve in eye candy though, forcing one to "roll their own" if the design calls for gradients, animations and so forth.

Tcl and Tk, however, remain a good pragmatic solution for most types of applications. If you're trying to compete with a flash application you'll lose. But if you have an industrial application that just needs to work and be usable and perhaps multi-platform, Tk is still one of the best choices out there.


As of 2015, there's a nice write-up about modernizing Tkinter's IDLE IDE. The article describes some of the steps taken to make IDLE more modern looking:

6
  • 1
    I believe Bryan is spot on. Tkinter can be made to look very pretty with the proper amount of care. Commented Feb 23, 2011 at 8:48
  • @BryanOakley: Could you fix the image above right after the paragraph of "...the original screenshot can look like this:"? Right now it shows as "alt text" on my Firefox browser.
    – bgoodr
    Commented May 12, 2012 at 14:10
  • @bgoodr: if I had to guess I'd say stackoverflow's image hosting service is down. If I directly go to the URL in the image I get a 505. Commented May 12, 2012 at 17:52
  • 3
    Could you please post the tweaks here , so that others can actually start working upon them Commented Aug 30, 2013 at 8:57
  • 1
    @Копать_Шо_я_нашел: thanks for pointing that out. I've re-added the image. Commented Nov 24, 2015 at 21:38
34

The "it's just different" argument is, in fact, the main reason for me. Tk GUIs don't look and behave like a native application, which affects the "look & feel" in multiple small ways, which make a complex app feel weird and clunky compared to native apps on given system.

File dialogs may be a perfect example of what I am writing about: they may not be "worse" or "better" than native dialogs on some system, but they are DIFFERENT, they behave differently to all the rest of applications on the system.

If you're MacOS X user, you may get a feel of it by comparing native Mac apps with apps running on Mac with X11 compatibility layer (like Gimp or Inkscape). They behave differently to all other apps (no menu at top bar, cmd+tab works a bit differently, cmd+backtick works much differently), so - while their behaviour is fine on Linux X11 desktop - the same behaviour feels weird and clunky on Mac.

Downside of Tk is that these GUIs aren't actually native anywhere.

For a portable UI, I may recommend wxWidgets, which are just a common API layer (a facade) for whatever native UI your system provides. It may be a bit offtopic for your current situation, but it may be worth looking at anyway.

6
  • 16
    +1 for the "Downside of Tk is that these GUIs aren't actually native anywhere." I think that is exactly why it's considered "ugly".
    – thijs
    Commented Dec 8, 2008 at 13:07
  • 9
    Are you aware that Tk has had native file dialogs for a number of years? Also, tk 8.5 comes with native widgets for the Mac and Windows. Alas, linux doesn't really have the notion of a single native widget set. Commented Dec 8, 2008 at 14:44
  • 4
    TK was actually designed to emulate a 'native' Motif look-and-feel when it was first developed. Commented Dec 8, 2008 at 19:46
  • 3
    I agree that look & feel differences (sometimes obvious, sometimes subtle) are the primary reason for the poor reputation. I feel the same way about Java apps. Tile support goes a long way toward addressing this but the developer still needs to do a lot of careful work to make it feel right. Commented Jan 7, 2009 at 22:05
  • 2
    Tk's reputation does not only come from it being different, but mostly from it having a very old-fashioned look, as Motif and Windows 3.11. In the last 15 years people have been used to much more modern GUIs, and accustomed to homogeneity. I would never touch Tk because it would make my app look old and... unprofessional.
    – Steve K
    Commented Aug 2, 2013 at 20:48
24

TK has considerably better support for native look-and-feel GUI's than it used to. Earlier versions of Tk had a motif-ish look and feel, which was intended to be used with motif-based desktop environments such as MWM and CDE. In this environment it looked like a native application. For a long time, Motif was used as a default GUI toolkit for X11 apps. The advent of GTK and (to some extent) QT means that this is no longer really the case for many such applications.

Most modern cross-platform GUI toolkits - GTK, QT Tk, WXWidgets and others - have some mechanism to use the underlying native widgets now. WX was designed to do this from the beginning - GTK and Motif versions on X11, Win32 on Windows and (IIRC) an OSX version. GTK has a theming engine and uses themes based on native widgets. QT emulates the look and feel and Tk has a wrapper for the native toolkit.

Examples of TK apps with native look and feel:

  1. SnackAmp (Win32 on Vista)

SnackAmp Tk GUI on Windows Vista

  1. PostgreSQL Access on Linux

Native looking Tk API

0
10

Because its look-n-feel was designed by people who are neither UX nor graphics designers, but programmers. Maybe it solves the problem (having same UI across a number of platforms), but it looks ugly.

Added: Actually, getting UI to the point where it's not considered ugly is an art. I have two extremes in my team. One guy just doesn't care about UI: he sees a button and it's a button no matter how it's drawn on the screen; even if you paint it "pop my eyes" lime green on a bright red background he'll still consider it a button, because it "quacks as a button". The other team member is all about making UI "cool". But he completely misses the point that it's not just shiny look makes Office 2007 "The Office 2007", but it's also icons, consistency across the controls, the way you interact with them -- all these little details that solder look with feel. The result? A lipstick on a pig.

9

Just one example: if you look at the example you provided, you'll see lots of extra lines - a scrollbar has a few, then the rectangle of the text holder has a few, so on the border you have rather a lot happening.

For a programmer there may be nothing wrong for we see logically, and logically every element just has its own border. But for the rest of people it looks overloaded.

This is a visual design question, not a programming one. This is more like "why iPod is nice and the Zune ugly" kind of thing - you can't get a straight measurable answer, still most people would agree, and that's a fact you need to do something with, if you care about their opinions - i.e., to sell to them.

8

It's rather hard to try and be objective about such an issue, this is very subjective at heart I think.

A few points that seem to disturb me:

  • Scrollbars everywhere, not just where needed
  • Rather "fat" scrollbars, that take up a lot of room
  • Plenty of bold-looking fonts, e.g. in the menu titles and so on
  • Constant-width ("typewriter style") text in some places
1
  • 1
    "scrollbars everywhere" -- that's a function of the UI designer. You don't get scrollbars in a Tk app unless you put them there. And it's quite possible to make scrollbars that hide or show themselves depending on content. All the rest of your comments seem to apply only to either very old versions of Tk, or perhaps linux versions. On the mac and windows you get native fonts, native scrollbars, variable width text. Commented Oct 27, 2011 at 18:36
6

Seems this discussion ought to at least mention these links:

http://wiki.tcl.tk/8646 http://wiki.tcl.tk/9485

0
1

Tk is beautiful or not, it depends on the person but I would say that its atleast not ugly (except for android). Have a look at the screenshots of a program I made using pure python and tkinter (Tk). You just need to know how to use it in more beautiful manner.enter image description hereenter image description here

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.