[hopefully someone will write an introduction to tk, explaining its virtues]
Tk is a Tcl extension designed to make creating GUI interfaces simple, yet giving said applications remarkable power for all their simplicity.
The Tk canvas is one of the more powerful widgets developers have found. The Tk text widget has built in hypertext and undo/redo capability. Tk was designed for rapid development.
Hints for beginners (things that may not be obvious if you come to Tk from the wrong community):
The window concept
- Every rectangular unit (in particular: the various widgets) on the screen is called a window. Windows as in "document window" is a toplevel.
- Windows (toplevels excepted) do not show on screen until they have become mapped. This happen when they are assigned a geometry manager, such as pack or grid.
- Every window has a unique name, which is also the name of a command. This command -- the "widget command" -- is used to control the window: change contents, set options, change view, etc.
- Windows are created and destroyed in a hierarchy. This hierarchy is visible in the window names: removing the last period (.) and all that follows it from a window name gets you the name of the parent window. (Exception: the root window is called "." (one period) rather than "" (empty string) as this rule would imply.) All window names start with a period.
Some example programs:
...
Category Documentation