Home Contact

TkDocs

Information you need to build high-quality Tk user interfaces.

This weblog, a companion to the main TkDocs website, brings you the latest news, articles, tips, site updates and more, to help you stay on top of the latest happenings in the Tk world, so you can get the most out of Tk.

March 30, 2009

Admin: Backlog.

Apologies for the paucity of updates in the last while; unfortunately it will be more of the same for at least another month or so. I'm in the middle of relocating, which needless to say is taking time away from all kinds of things. Thanks to everyone who has been contributing corrections, comments and suggestions; these are all being diligently filed away until I next get the chance to work on the site. Am also looking forward to diving into the Python side of things...

February 13, 2009

ActivePerl 5.10 includes Tcl/Tk 8.5.

Thanks to a couple of people who let me know that ActivePerl 5.10 now includes Tcl/Tk 8.5.4 (previous versions had bundled 8.4.x). This makes things a lot simpler for Tkx users, who no longer need to separately install ActiveTcl, and get it to talk nicely to ActivePerl.

I've updated the installation instructions in the tutorial with the now simpler recommendation to just install ActivePerl >= 5.10.

Thanks also to the ActivePerl maintainers!

February 10, 2009

Ruby GUI Programming Survey.

If you haven't already seen it, check the survey results from a good study on impressions and perceptions of GUI libraries and more in the Ruby community. Definitely worth a read.

I'm not surprised about how Tk fared, but any thoughts as to what's behind that (e.g. how much is perception based on old docs and old versions vs. the new stuff still not cutting it)?

February 03, 2009

Ttk support in Python.

Guilherme Polo passed along the great news that his pyttk module has been accepted into Python's standard library.  

That means we should see pyttk generally available with Python 2.7 and 3.1 (both still in development).  You can see the current docs here.  And of course, this is something I was waiting for before updating TkDocs with Python info and examples.

Thanks for all your hard work Guilherme!

November 07, 2008

Tutorial updated for Perl (Tkx).

I've completed (more or less) integrating in the Perl examples and other language-specific material into the tutorial.  Please let me know of any corrections, etc.

June 20, 2008

Tkx rocks!

Perl's Tkx module is an incredibly elegant hack. Because of the 1-to-1 mapping with Tk's Tcl API, doing the conversions is really simple. I'm probably about a third of the way through adding the Perl material to the tutorial. Not being a Perl guy myself, if anyone has time to take a glance through what's there and see if I've made any fundamental screw-ups, that would be most appreciated.

June 17, 2008

Python and Perl.

I'm going to hold off a bit on adding Python "support" to the tutorial. Guilherme Polo, is working on a Google Summer of Code project to add Ttk support to Tkinter. We've been in touch already, and it probably makes sense to hold off on the tutorial a bit until Guilherme's work progresses a bit further. Kevin Walzer, who did an earlier Ttk Python binding, has also offered his help. Thanks guys!

Perl is not a language I'm terribly familiar with or comfortable in, though I did once force myself to put together a couple examples for people wanting to automate ProjectForum. However, because the preferred modern Tk binding for Perl (the Tkx module) is just a very thin layer over the Tcl API, adding it to the tutorial shouldn't be too painful. I'll be working on that over the next little bit.

June 07, 2008

Installing Ruby Tk.

Thanks to various people who provided details and pointed me at various resources, I've managed to properly build versions of Ruby 1.8.7 that use Tk 8.5.2 on both Mac OS X and Windows (the Linux one I'd managed before). The Installing Tk chapter in the tutorial has been updated accordingly.

May 28, 2008

First draft of styles tutorial.

Ok, I've completed a draft of the styles and themes chapter of the tutorial. I don't doubt there are parts where I got things wrong, so please let me know of any errors or parts that were unclear or could be improved.

May 24, 2008

Ttk Styles.

I've been working through Ttk's styles in order to develop that chapter of the tutorial. I'm making good progress, actually. I have to say I have a much better appreciation for how the system works, and perhaps more importantly, why it works that way.

As I write this chapter I'm trying to extrapolate from concepts that existed in an almost embryonic fashion in classic Tk (e.g. states and -class for a few widgets), and which have been hugely generalized and extended in Ttk. Some of the motivation, besides the obvious "make widgets that can look different", are much clearer to me now. When it says that it takes appearance decisions out of the widget authors hands, it really does mean it. Coming from classic Tk where that meant exposing a configuration option that the widget would use, the implications of this really take some time to sink in.

I also think I understand why the styles stuff can be so difficult for people to use and grasp. At the same time you're trying to focus on the conceptual stuff, there's the practical reality that the pieces that make up styles and themes on each theme (and hence each platform) are different. So if I see an example, it may not work for me at all, leaving me frustrated. And given these details aren't really documented, but gleaned through introspection (which you can't do if the theme isn't on your platform), it adds up to a multi-layered topic with often conflicting examples. Plus, with themes, you really have to do things properly up front, as opposed to classic Tk where you can throw something in, expect it to kind of work, and fix it later.

(Recently I've been doing some work in Cocoa after not using it for many years, another system where the combined conceptual/practical hump makes learning difficult and slow going. Lucky me.)

So far I've got all the conceptual stuff out of the way, with some basic examples, but with that done, the remaining sections on how to make some of the modifications and customizations should be fairly quick to write up...