two_autosb(n) manual page

Back to the Index
Table of Contents

Name

two_autosb - Create and manipulate an automatic scrollbar widget

Synopsis

package require twoAutosb ?1.0?
two_autosb pathname ?options?

Description

The two_autosb command creates a new window which is virtually the same as a normal Tk scrollbar widget. The main difference is that an two_autosb widget is only visible when it is really needed: it automatically disappears whenever there is nothing to be scrolled.

two_autosb thus helps saving space within the GUI.

Options

The same as scrollbar(n) .

Elements

This widget is implemented as a normal Tk scrollbar embedded within a frame (class: TwoAutoSb).

Bugs

Unfortunatley, the two_autosb cannot really disappear completely; it will leave a frame widget with a width (or height) of 1 pixel. The reason is that the real scrollbar is embedded within a frame, and this frame has to stay up in order to keep different kinds of geometry management working. A frame widget apparantly can't be set to a null size.

There are cases where the auto scrollbar does not appear or disappear when it should. The basic problem with automatically hiding a scrollbar is that this action usually changes the viewable area of the scrolled widget. This might in turn change the need for a scrollbar - without any protection, the show/hide would loop forever. Unfortunately, this protection against looping sometimes prevents scrollbar visibility.

Author

Frank J. Leitner
frank@fjl.de

See Also

scrollbar(n) .


Table of Contents


Back to the Index