With the use of the SCROLL-BAR control, a user can scroll through a continuous range of items. This control has five elements — next and previous line buttons, next and previous page regions, and a slider (also called a thumb), which indicates the current position in the range.
Scroll bars are available both for character-based and Microsoft Windows systems. For character-based systems, you may choose to display the various parts of the scroll bar with the GO-GUI-MAP and GF-GUI-MAP termcap functions. You may also do this with the GUI_CHARS configuration variable.
When a user clicks on a scroll bar, a message is sent to the scroll bar's event procedure, which updates the screen according to the new scroll position. Scroll bars don't generate terminating events, so any ACCEPT statement remains active while the user adjusts the scroll bar. The scroll bar does not automatically update its own value when the user modifies it. You should respond to each message by setting the scroll bar's value to the new position. Otherwise, the scroll bar will return to its previous setting after the user finishes. For a detailed description of these events, see Events Reference.
The ACUCOBOL-GT runtime supports the use of a mouse wheel with the scroll bar control in all versions of Windows that support the wheelmouse. Those versions are: Windows ME, Windows NT 4.0, and Windows 2000 and higher. Support applies only to vertical scroll bars. The Windows operating system supports mouse wheel rotation through the WM_MOUSEWHEEL message. The runtime intercepts the WM_MOUSEWHEEL events and translates them into WM_VSCROLL messages, which are then handled as conventional mouse button clicks on a scroll bar. By default, a single WM_MOUSEWHEEL event is translated into three WM_VSCROLL messages. The application user can configure this number to suit his or her preference through the Mouse Properties sheet in the Control Panel.