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.

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...

April 25, 2008

Tutorial update.

Woo hoo! Finished drafting up the tutorial chapters on the "big" widgets: canvas, text, and treeview. Could styles be next? Stay tuned...

March 19, 2008

Google Summer of Code.

Tcl/Tk was one of the accepted organizations for this year's GSoC. In other words, there's a bit of motivational cash out there for any keen students. While the current project ideas list already includes several Tk-related ones, students are encouraged to propose others.

I'd think this would present all kinds of great opportunities for the non-Tcl language communities to update, modernize and improve their bindings with Tk. Also perhaps not a bad idea to propose a way to make using Tk's two different widget sets from Tcl a bit less disjointed.

March 18, 2008

Best of Intentions.

While I doubt anyone is shocked that the first cut of this site hasn't yet been completed, don't worry. A major software release at my main gig came out mid-late January, and keeping on top of that has taken a lot of time since then. Plus I've started looking not only at a follow-on release of that product, but also at a couple of potential new products. And if it's any consolation, some of the time I'm sure I'd have otherwise spent on TkDocs was spent reviewing a draft of an upcoming Tcl/Tk book.

Excuses aside, I'm actually working now on the canvas widget part of the tutorial, to be followed shortly by the text widget part. If I'm feeling brave after that, I'll attempt to delve into the black art of Ttk styles. Or if I'm not feeling brave, there are a few other parts of the site that need to get fleshed out.

On the plus side, the site is already getting a good number of visitors, and I've gotten a lot of positive feedback and suggestions. Lots of people from other language communities who use Tk have also got in touch.

January 16, 2008

Ruby/Tk Group.

I just stumbled across the Ruby/Tk group that Jay Williams recently set up; it seems sharing Tk knowledge is in vogue for the new year!

January 11, 2008

Current status.

As of today, most of the intro material is done. The bulk of the first sections of the tutorial are done, leaving mostly a lot of widgets left to do. Also not complete in there is the "installing Tk" part. I've started on the "widget roundup"... well, have created one entry for button anyway. Also, consider all screenshots on the site preliminary, as I want to think about ways of displaying things nicely, but also covering all three platforms. Also fought with Typepad to get the weblog to match the main site, now that the design has pretty much settled down.

Next up will be more widgets in the tutorial and in the widget roundup...