A tool window of this type is usually not required on its own. Almost all windows that are containers for lines of text, images, or other objects automatically provide scroll bars when needed. However, a few years after the creation of KOL, such a window object was added. It allows you to organize the scrolling of arbitrary elements without being part of any window object.
Constructor:
NewScrollBar(Parent, side) - Creates a scroll element, giving it a direction - vertical or horizontal.
In addition to the general visual properties inherent in all window objects, the scroll element has a number of specific ones only for it. Namely:
SBMin - minimum scroll position (initial value 0);
SBMax - maximum scroll position (initial value 32767, but any integer greater than SBMin is allowed);
SBMinMax - intended for obtaining or changing the properties of SBMin and SBMax in one step, through the TPoint structure;
SBPosition - current scroll position, from SBMin to SBMax inclusive;
SBPageSize - page size. Used to scroll by page as an increment or decrement for SBPosition. In addition, if this value is not zero, then the system automatically calculates the size of the "slider" on the scroll bar, so that it, if possible, demonstrates how large one page of scrolling content is - compared to the entire content (this size cannot visually, however, be less than a certain minimum value determined by the system);
OnSBScroll - an event that is triggered when scrolling is performed. In the case of scrolling by dragging the slider on the ruler with the mouse, this event occurs regularly until the slider is released.
Mirror in MCK: TKOLScrollBar.