Version 93 of Tk

Updated 2012-08-29 15:12:15 by pooryorick

Tk Package

see Tk Package

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

Articles

 * [Tk Sets The Standard by Cameron Laird and Kathryn Soraiz]

 * See an [Intro to Tk], for a few paragraphs describing

what Tk is and why it is so unique.

See also


[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!