getScrollRange

getScrollRange(scrollBar: Integer;
               min:       Integer output;
               max:       Integer output;
               smallChg:  Integer output;
               largeChg:  Integer output);

The getScrollRange method determines the scroll range information for the window. The getScrollRange method gets the scroll ranges for Form, ListBox, TextBox, BaseControl, Picture, and JadeRichText controls.

Scroll range data has no impact unless the window also has a corresponding scroll bar.

TextBox controls can obtain the current scroll range but cannot set the current scroll range. This range is determined automatically by the amount of text data in the control.

ListBox controls also only offer the getScrollRange method, as the ranges are set automatically by the control.

The scroll data that is available using the method parameters is listed in the following table.

Parameter Description
scrollBar 1 for horizontal, 2 for vertical
min Minimum of scroll range
max Maximum scroll range
smallChg Size of scroll change when user clicks a scroll arrow
largeChg Size of scroll change when user clicks elevator or uses Page keys

All data units are in pixels.

For Form and Picture controls, the default scroll range data is listed in the following table.

Value Default
min 0
max 1000
smallChg 20
largeChg 100

For a TextBox control, the default scroll range data is determined by the amount of text in the control and cannot be set. For text controls, smallChg and largeChg data returned for the getScrollRange method is zero (0), as these are controlled by Windows and are unobtainable.

Control of the scroll bar position can be obtained by using the scrollHorzPos and scrollVertPos properties.

For the JadeRichText control, scroll range data has no impact unless the control also has a corresponding scroll bar. The scroll data that is available using the method parameters is listed in the following table.

Parameter Description
scrollBar ScrollBars_Horizontal or ScrollBars_Vertical
min Minimum of scroll range
max Maximum scroll range
smallChg Always retrieves zero (0) as it does not apply to the JadeRichText control
largeChg Size of scroll change when user clicks elevator or uses Page keys

All data units are in pixels.