Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version

thumb-length

Arguments: scroll-bar

Returns the value of the thumb-length property of scroll-bar controls (vertical-scroll-bar and horizontal-scroll-bar). Its value is either a positive integer that indicates how large the "thumb" (also called the elevator or scroll-box) of the scroll-bar should be, or else nil to use a default size. The thumb will be drawn such that the length of the thumb compared to the length of the rest of the interior scroll-bar length is proportional to the thumb-length property compared to the size (scroll-max - scroll-min) of the scroll-range property.

If a scroll-bar control is being used to scroll a portion of some drawing into a scrollable area (as window scrollbars do), then typically an application would set the thumb-length to the size of the visible area and scroll-range to the size of the portion of the picture that does not fit within the visible area. Otherwise the thumb-length may not be relevant, and the default size (where thumb-length is nil) may be best.

In releases prior to 6.0, this property was called visible-portion. That symbol still names this function (and the :visible-portion initarg is still accepted), but use of visible-portion is deprecated. Further, the meaning has changed somewhat.

In releases prior to 6.0, the range of a standalone scroll-bar control included the thumb-length (then called visible-portion), which made it similar to the whole page of a scrollable window rather than the scrolling range (which is the page minus the visible portion of the page). This was an inconsistent usage of the Common Graphics scroll-range concept. It also meant, for example, if the range of a standalone scroll-bar control was 0 to 100 and the thumb-length was 20, then the possible values of the scrollbar actually ranged from 0 to 80 rather than the alleged range of 0 to 100. Starting in release 6.0, the range no longer includes the thumb-length.

It is not possible to disable a scroll-bar dialog-item by setting its thumb-length to be greater than or equal to the range. You can disable a scroll-bar control by setting the range with the min value equal to the max value, such as (0 0). (Also, as with other controls, scroll-bars may be disabled by setting its available property to nil.)


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version