Chapter 11

Introduction to Tk Graphics

Everyone knows the fun part about computer programming is the graphics. The Tk graphics package lets a Tcl programmer enjoy this fun too. Tk is a package of graphics widgets that provides the tools to build complete graphics applications. Tk supports the usual GUI widgets (such as buttons and menus), complex widgets (such as color and file selectors), and data display widgets (such as an editable text window and an interactive drawing canvas).

The user interaction widgets include buttons, menus, scrollbars, sliders, pop-up messages, and text entry widgets. A script can display either text or graphics with the text and canvas widgets. Tk provides three algorithms, for controlling the layout of a display, ...

Get Tcl/Tk, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.