Version 75 of Tk

Updated 2010-10-24 15:55:25 by dkf

Purpose: central place to organize Tk related information on the wiki, etc.

NOTE: Besides being the name of the package, there is also a Tk command within the extension! See below for details.


Tk Package

 What: Tk
 Where: http://sourceforge.net/projects/tktoolkit/ 
        http://prdownloads.sourceforge.net/tcl/ 
        ftp://tcl.activestate.com/pub/tcl/nightly-cvs/ 

        http://www.tcl.tk/ 
        http://www.tcl.tk/software/tcltk/ 
        ftp://www.tcl.tk/pub/tcl/mac/MacTk8.3.1.sea.hqx 
        ftp://www.tcl.tk/pub/tcl/misc/w32s130.exe 
        ftp://www.tcl.tk/pub/tcl/misc/unz512xN.exe 
        ftp://www.tcl.tk/pub/tcl/tcl8_0/vclibs80.zip 
        http://resource.tcl.tk/resource/ 
        http://wiki.tcl.tk/HowDoIReportABug 

        http://www.cs.wisc.edu/%7Embirk/bc450rtl.zip 
        ftp://info.service.rug.nl/networks/novell/netwire/novuser/11/bc450rtl.zip 
        ftp://nic.switch.ch/mirror/novell/netwire/novuser/11/bc450rtl.zip 
        ftp://nctuccca.edu.tw/vendors/Novell/netwire/novuser/11/bc450rtl.zip 

        http://www.bj-ig.de/tcltk/flat.txt 
        http://www.bj-ig.de/wtk/ 
        http://ftp.bj-ig.de/pub/tcltk/README.speedpatch 
        http://ftp.bj-ig.de/pub/tcltk/ 

        http://www.cl.cam.ac.uk/%7Emgk25/ucs-fonts.html 
        http://www.xraylith.wisc.edu/%7Ekhan/software/tcl/ 
        ftp://ftp.ucsd.edu/pub/alpha/tcl/ 
        http://jfontain.free.fr/tcltk.spec 
        http://people.a2000.nl/hkooiman/hjk/mpw/ 
        http://xcin.linux.org.tw/ 
 Description: Tk is an extension for Tcl which acts as a high level interface
        to a machine's windowing system. On Unix, that would be X11. On
        Windows, that is the Windows OS. On MacOS, that is either X11
        or Aqua (there are at least two builds for MacOS).  It provides
        the means to write simple scripts to create and manipulate
        operating system windows with the various manipulators available
        in C libraries.

        The Wiki site contains a description of the process for
         reporting bugs and patches.
        The ucs-fonts page point to a fixed font which supports
         over 2800 ISO 10646-1 characters.
         There are supposedly other Unicode character supporting fonts.
        The xraylith site has patches for Tk so that it will build under
         either Mingw (native windows 32 bit) or Cygwin (POSIX emulation
         layer) environments using the GNU c compiler.
        The ucsd site has some Codewarrior mcp files to compile Tk8.2 on
         the Macintosh.  The a2000 site documents the changes needed
         to Tcl and Tk 8.2.1 to compile with MPW.
        The xcin web site is a project generating patches for X software
         to support the Chinese input methods.
         Patches for Tk are in the process of being written.
        The Tcl core site has a directory where they are accumulating
         patches for Tk.
        Tk 8.x depends on the corresponding Tcl 8.x package being installed.
        Source or precompiled binaries for Windows (Win32s, Windows 95
        The ime zip file contains Tk 8.4a1 patches for Windows to
         support the Japanese Input Method Editor.
        Tk 8.4.15 is the latest release of Tk, with Tk 8.5a6 being tested.
 Updated: 05/2007
 Contact: See the web site

"Tk sets the standard" [L1 ] aims to introduce Tk to a general audience.

See an Intro to Tk, for a few paragraphs describing what Tk is and why it is so unique.


[Insert here pointers and discussions regarding Tk features]


As is well known, most Tcl distributions provide two interpreters, tclsh and wish. The main differences between these are that wish automatically starts Tk and on Windows doesn't pop up a DOS console window (puts commands to standard output just don't go anywhere). Until recently, for technical reasons using wish had to be the only way to get at Tk. However, in later versions by using Tk as a loadable package you can use it via tclsh and still have full console access on all platforms.


Many other languages have Tk packages; some of which work by loading all of Tcl in and then executing Tk commands. Perl/Tk, on the other hand, rewrote all of Tk in a way that wasn't bound to Tcl, for example. See Tcl and other languages.


Among other topics in "Tcl/Tk for Rapid Web Services Development" [L2 ], CL hints at the advantages Tk interfaces enjoy over both Web applications and traditional Visual Basic form-oriented GUIs. He's published dozens of other articles [L3 ] on various aspects of Tk (without more than scratching the surface of all that can be written). For instance, see http://www.itworld.com/AppDev/1243/UIR000804tk/ as a nice intro to Tk.


Look here to find tutorials for Tk in Tcl [L4 ] and in Perl [L5 ].


TV Where does the name come from, ToolKit?

Yes.


Tk has an Xlib Emulation Layer XLEL, which is one part in making Tk work across different platforms.

That there is such a level is an important reason why Tk generation when X11 headers are missing can be an issue: the Tk source uses X11 headers even when Tk at runtime uses some other windowing system.


[Things to explain: Bryan Schofield's posting on multiple Tk interpreters; double-buffering examples; ...]


Has anyone been thinking adding a tutorial for Tk into the Tk source code distribution, similar in concept to the Tcl tutorial being added in Tcl 8.5?

DKF: Thinking? Yes. Doing anything about it? No. A set of lessons for Tk would be a very welcome addition!


Tk Command

tk is also the name of a Tk command. See:

http://www.tcl.tk/man/tcl/TkCmd/tk.htm

tk appname ?newName?
tk busy subcommand ...
tk caret window ?-x x? ?-y y? ?-height height?
tk inactive ?-displayof window? ?reset?
tk fontchooser subcommand ...
tk scaling ?-displayof window? ?number?
tk useinputmethods ?-displayof window? ?boolean?
tk windowingsystem

See also