Chapter 18. 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 18-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.