Scrollutil , by Csaba Nemethi, is a scrolling utilities package for Tk 8.0 or higher, written in pure Tcl code.
The Scrollutil package contains:
The scrollutil::scrollarea mega-widget greatly simplifies the creation of arbitrary scrolled widgets. It consists of a scrollable widget and two scrollbars connected with that widget. The display mode of each scrollbar can be static, dynamic, or none.
The scrollutil::scrollsync mega-widget is designed for scrolling several widgets simultaneously. It is horizontally and vertically scrollable, hence it can be embedded into a scrollutil::scrollarea widget via the latter's setwidget subcommand.
The scrollutil::scrollableframe mega-widget is a lightweight, theme-able, and full-featured replacement for BWidget ScrollableFrame and iwidgets::scrolledframe. Arbitrary regions of its content frame can be brought into view by scrolling, and the widget also provides a see subcommand for making individual widgets contained in the content frame visible in the scrollableframe window.
The scrollutil::scrollednotebook mega-widget is based on a ttk::notebook within a scrollableframe and supports an arbitrary number of unsqueezed tabs. The package also implements the navigation between the tabs of a ttk::notebook or scrollednotebook widget via the mouse wheel, as well as the support for moving the tabs with the mouse and closing them with the aid of the new closetab style element.
The scrollutil::plainnotebook mega-widget extends a ttk::notebook having an arbitrary number of pages with invisible tabs by a ttk::frame to its left or right containing, among others, a scrollableframe whose content frame is the parent of a series of widgets that play the role of vertically laid-out notebook tabs.
The scrollutil::pagesman mega-widget provides the basic functionality of a pages manager, meaning that it manages a list of windows, of which only one is visible at a time. By using it with plainnotebook widgets as pages, it is quite easy to write applications in which the user can navigate between the plainnotebooks with a single mouse click.
The commands for mouse wheel event handling in scrollable widget containers make sure that the mouse wheel events will only scroll the widget under the pointer if it has the focus, otherwise they will scroll the widget container that is an ancestor of the widget in question and is contained in the latter's toplevel.
Jeff Smith 2021-05-28 : Below is an online demo using CloudTk. This demo runs "Scrollutil" in an Alpine Linux Docker Container. It is a 28.3MB image which is made up of Alpine Linux + tclkit + Scrollutil1.10.kit + libx11 + libxft + fontconfig + ttf-linux-libertine. It is run under a user account in the Container. The Container is restrictive with permissions for "Other" removed for "execute" and "read" for certain directories.
By clicking on the "V" in the upper left corner you can access other demos.
Csaba Nemethi 2020-01-15 : The Scrollutil version installed on the CloudTk server is now 1.4 (many thanks to Jeff for the upgrade). This version creates mouse wheel event bindings for the ttk::scrollbar widget, which (as of Tk 8.6.10) are missing in the Tk core. The demo script applies the command scrollutil::addMouseWheelSupport to the text widget, thus making sure that the mouse wheel scrolls the text by lines rather than pixels. Last but not least, the scan support (added to the scrollutil::scrollableframe widget in Scrollutil 1.3) enables you to drag the content of the scrollableframe at high speed with the aid of mouse button 1.
Jeff Smith 2021-05-28 : The Scrollutil version installed on the CloudTk server is now 1.10.