Chapter 11. BLT

BLT, written by George A. Howlett, is not part of the core Tcl/Tk package, but can be obtained for free at http://www.tcltk.com/blt. At the time of this writing, the final 2.4 version of BLT had not been released. However, because of the addition of the tabset and hierbox widgets, it is bound to quickly become a popular version. Therefore, this chapter documents prerelease 2.4f, which should be extremely close to the final version. Footnotes in the description denote where changes may be expected.

BLT is an extension to Tcl/Tk designed to simplify a number of tasks that would normally require considerable coding. It provides commands for producing graphs and managing numerical data, a table-based geometry manager, a drag-and-drop facility, and several other graphical and utility commands. Several of BLT’s commands have been partially incorporated into the standard Tcl/Tk distribution. It works with Unix under the X Window System and with Windows.

BLT can be loaded from existing Tcl applications or one can use the supplied bltwish command interpreter. In the former case, BLT can be loaded using the command:

package require BLT

on a properly configured system. The BLT commands will be defined in the blt:: namespace. To make the BLT commands globally accessible, issue the command:

namespace import blt::*

Figure 11-1 shows some examples of BLT widgets.

Examples of some of the BLT widgets
Figure 11-1. Examples of ...

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.