Chapter 32. 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.

Get Practical Programming in Tcl & Tk, Third Edition 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.