The Scrollbar Widget

Tk 8.0 uses native scrollbar widgets on Macintosh and Windows. While the use of scrollbars with other widgets is identical on all platforms, the interpretation of the attributes and the details of the bindings vary across platforms. This section describes the Tk scrollbar on UNIX. The default bindings and attributes are fine on all platforms, so the differences should not be important.

The scrollbar is made up of five components: arrow1, trough1, slider, trough2, and arrow2. The arrows are on either end, with arrow1 being the arrow to the left for horizontal scrollbars, or the arrow on top for vertical scrollbars. The slider represents the relative position of the information displayed in the associated widget, and the size ...

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.