Updated 2014-04-25 03:35:46 by pooryorick

Summary  edit

An interactive community project to teach Tk scripting.

Description  edit

This is a list of pages useful to those learning Tk. Please help add pages items and explanations, and arrange them in an order that would be mose useful for efficient learning.

General Information  edit

What is Tk?
Tk syntax help
Tk glossary
When all you want is to run a Tk application
Common questions about Tk
ActiveTcl User Guide
For ActiveTcl
Tk performance
Apple Macintosh and Tcl/Tk
Microsoft Windows and Tcl
Microsoft Windows and Tk
Windows/CE
Pocket PC
Some common mistakes when programming in Tcl/Tk
Widgets in the initial Tk package
Coming to Tcl/Tk from an IDE environment

Basic Examples  edit

The Hello World program as implemented in Tcl/Tk
Show me an example
takes the Hello World program farther.
Hello, Widgets! (a rock-bottom basic tutorial in Tcl and Tk)
Reinhard's demo editor
The beginnings of a text editor in about 200 lines of code. Although it is incomplete, it's a nice simple skeleton for a beginner to study. Use it as a tutorial by studying the successive commits. Tip: Use the diff functionality to visualize the development of the program.

Events  edit

Event programming and why it is relevant to Tcl/Tk programming
Bindings and why they are important

Patterns  edit

Interrupting loops
how to build a stop button
Overloading widgets
Writing Tk programs so that the user can do simple custimizations without modifying the application
Writing Tk programs so that the user can extend or interact with them without modifying the application
Adding User Data to Widgets the Megawidget Way
Some people have been asking (on news:comp.lang.tcl) for the Tk core to be modified so that widgets all carry with them some additional user data. This is not necessary. The following script illustrates how you can do this without all that paraphernalia in pure Tcl...
the canvas as a data store
Serializing a widget

Developer Tools  edit

Tcl/Tk Template Applications
a template for a basic Tk application

Menus  edit

menu
Menus made easy

Dialogues  edit

A file properties dialog

Fonts  edit

How does one change the font in the wish widgets?

Text  edit

A change-sensitive text widget
A little spellchecker
A little hypertext system
Text widget syntax highlighting
A minimal console
A minimal editor explained
How do I insert text programmatically at the current insertion point
in a text widget?
A do-it-yourself IDE with the text widget

Text Entry  edit

An entry with a history

Canvas  edit

An analog clock in Tk
Tkeyes
Text widget example
Shapes and Lights - a simple canvas script
A little function plotter
A minimal doodler explained
A tiny drawing program

Image  edit

Tk image Dos and Don'ts

Layout  edit

Paning widgets

Meter Displays  edit

A simple voltmeter
Dial widget

Miscellaneous Examples  edit

Widgets in the initial Tk package
many screenshots
Tk examples
A little file searcher
Scroll bars that appear only when needed
Bag of Tk algorithms
lots of little procs, help yourself
Which Widget
How to find the name and type of a TK Widget.

If you don't know Tcl all that well yet, you should visit Beginning Tcl to help you get the hang of the language that Tk is most commonly hosted in.