Chapter 33. Scrollbars

This chapter describes the Tk scrollbar. Scrollbars have a general protocol that is used to attach them to one or more other widgets.

Scrollbars control other widgets through a standard protocol based around Tcl commands. A scrollbar uses a Tcl command to ask a widget to display part of its contents. The scrollable widget uses a Tcl command to tell the scrollbar what part of its contents are visible. The Tk widgets designed to work with scrollbars are: entry, listbox, text, and canvas. The scrollbar protocol is general enough to use with new widgets, or collections of widgets. This chapter explains the protocol between scrollbars and the widgets they control, but you don't need to know the details to use a scrollbar. All ...

Get Practical Programming in Tcl and Tk, Fourth 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.