Tk ugly? It looks fine to me
itworld.com
itworld.com
* The guys in charge of Tcl/Tk, in about 2000, completely missed out on seeing that the future of Linux UI's was Gnome and KDE, and basically did not touch the Unix Tk look and feel until Tk 8.5. This was a major mistake. It would have actually been possible to make Tk look at least a little bit nicer on Linux without even touching the C code, but this was not done.
* However, Tk looks decent on other platforms, and these days looks decent on Linux too.
* Tk also gained a bad reputation because it made it so easy for just about anyone to throw together a GUI. Very often, 'anyone' did, with no prior training or knowledge of how to do a proper GUI, and the results have given the toolkit a bad name where it's not really deserved.
* Where there is some blame to go around is the lack of a culture of creating good GUI's. Brent Welch's otherwise excellent book, for instance, contains next to nothing about how to make a good looking, effective GUI, although it has chapters on how to use all the different widgets.
At this point, Tcl and Tk have themselves something of a marketing problem, because despite some very real and positive recent progress, and lots of nice features, everyone "knows" that they are so 1999. If nothing else, Tcl and Tk have been a fascinating study in how to market good technology badly; and by marketing I don't just mean 'selling/advertising' but gathering user requirements, keeping up with market trends, and so on. That's not to say they don't have some problems, but they aren't insuperable or worse than problems other systems have.
In any case, if you need to do an cross-platform GUI, or a quick GUI on any platform, Tcl and Tk are still a very valid choice, depending on your requirements.
You're totally right, but also the fonts in particular were terrible blocky messes on Linux (and may well still be, I don't have any Tk apps anymore).
Anyway, it kind of reminds me of an era where people wanted computers to solve their problems, not solve their problems AND be some sort of fashion statement, like they are today.
I guess with these three lines in my .emacs
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
this wouldn't make much of a difference for me?
(honest question)I get rid of the tool bar and scroll bar too, but do leave the menu bar, as once in a while it's nice for fishing around for things I don't use often. Basically though, I just want as much screen real estate for code as possible.
depending on what your value for "once in a while" is, you might want to further optimize for screen real estate and just toggle the menu bar on and off when (seldomly) needed:
M-x menu-bar-mode
That's how I do it - and XMonad resizes the window automatically for me so that I never lose space and the Emacs window always fits on the screen.Thanks for the explanation of the difference between Emacs with/without Gtk+ support.
(defun menu-bar-show-hide-helper ()
(if (< (cddr (mouse-pixel-position)) 20)
(menu-bar-mode 1)
(menu-bar-mode 0)))
(defun menu-bar-show-hide ()
(run-with-idle-timer 0.1 t 'menu-bar-show-hide-helper))
It's not quite right, as it seems to require some other event to happen before it triggers.I went ahead and published that here, in case anyone wants to track it:
http://journal.dedasys.com/2009/11/16/emacs-fiddling-show-th...
1. I think buttons with relief are easier to use, but other than that I am always surprised at how worked up people get about theming (but then I prefer a terminal based emacs...).
2. Tcl/Tk has some GREAT ideas that are not implemented anywhere else: the built-in event handler, trivial to write callbacks, and the everything is a string philosophy (which is strangely like a self-evaling lisp approach)
3. Tcl/Tk had some really bad luck. This weekend at opensqlcamp, someone asked Selena Deckleman why PostgreSQL has not had a tenth the market share as MySQL. She said (paraphrasing): in 1999 a lot of the core devs thought the internet was just a fad -- whoops... Same mistakes maybe happened with Tcl/Tk -- it was there just a little too early.
4. Tcl/Tk demands C to be a really full platform, and C is scary to a lot of the new breed of scripters.
"Extending TK to direction of breath-taking animations" is not a trivial task. Well-designed animation subsystem that combines flexibility, ease of use and performance is actually rare beast. Even iPhone/Mac OS X CoreAnimation API is not that trivial to use for quick flexible prototyping.
"Brick" engine that the author mentions seem to provide a separate domain-specific language (motion control programs) for controlling animations. Although this can be good idea, it really makes harder to combine animations with each other and other time-related tasks (playing sounds etc).
Same deal in Firefox, the big image totally breaks it.
Also, his examples really don't give enough context to show /why/ Tk themes are so bad.
Still, Swing does prove a point, you CAN make an ugly UI more bearable by using themes alone, it doesn't make it an example of a beautiful UI, but it makes it bearable.
It's not just the theme that makes Tk seem like an antique; there are many commonly used widgets missing also. For example, I had difficulty making an editable listbox. I googled for a while and while other people had tried to implement it, most of the implementations were glitchy and didn't work the way you'd expect them to. Given the state of Tk right now, it can be easier to just whip up a GUI in Qt or GTK+.
On the plus side, Tk does have excellent documentation.
Using matplotlib for Python 2.5 on XP. I don't think there's any way to get the window handle to send it a WM_SETICON and besides, it would be best to use a native Tk call.