Chapter 23. ScrollBar Class

Table of Contents
SetRange
Range
SetPos
Position
DeterminePosition

The ScrollBar class provides methods to query and modify scroll bars. It inherits all methods of the DialogControl class (see page DialogControl Class).

Use the GetScrollBar method to retrieve an object of the ScrollBar class.

Requires:

The ScrollBar class requires the class definition file oodwin32.cls:

::requires "oodwin32.cls"

Methods:

Instances of the ScrollBar class implement the methods listed in the ScrollBar Instance Methods table.

Table 23-1. ScrollBar Instance Methods

Method......on page
DeterminePositionDeterminePosition
PositionPosition
RangeRange
SetRangeSetRange
SetPosSetPos

SetRange

>>-aScrollBar~SetRange(--min--,--max--+-----------+--)---------><
                                      +-,--redraw-+


The SetRange method sets the minimum and maximum positions for the associated scroll bar.

Arguments:

The arguments are:

min

The minimum position to which the scroll bar can be moved.

max

The maximum position to which the scroll bar can be moved.

redraw

If you specify 1 or Y, the scroll bar is redrawn using the new range. Otherwise, the range is set but the scroll bar display is not updated. The default value is 1.

Return value:

0

Setting the range was successful.

1

For all other cases.