O'Reilly logo

Practical Programming in Tcl and Tk, Fourth Edition by Brent Welch, Ken Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 35. The Listbox Widget

The listbox provides a scrollable list of text lines. The listbox supports selections of one or more lines.

Listbox widgets display a set of text lines in a scrollable display. The basic text unit is a line. There are operations to insert, select, and delete lines, but there are no operations to modify the characters in a line. As such, the listbox is suitable for displaying a set of choices, such as in a file selection dialog. By default a user can select one item from a listbox, but you can select multiple items by setting the selection mode attribute.

Using Listboxes

Manipulating Listbox Contents

The lines in a listbox are indexed from zero. The keyword index end addresses the last line. Other indices are described ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required