| **Navigation:**  [[introduction.htm|Language Reference]] > 9 -  Window and Report Attributes > Window and Report Attributes >====== RANGE (set range limits) ====== | [[preview set report output to metafiles .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[readonly set display only .htm|{{btn_next_n.gif|Next page}}]] | | || {{newc7.jpg|NewC7.jpg}} **RANGE(**//lower,upper//**)** {{blk2blue.jpg|blk2blue.jpg}} | **RANGE** | Specifies the valid range of data values the user may select in a SPIN control, or the range of values displayed in a PROGRESS control. | | //lower// | A numeric constant that specifies the lower inclusive limit of valid data (PROP:RangeLow, equivalent to {PROP:Range,1}). | | //upper// | A numeric constant that specifies the upper inclusive limit of valid data (PROP:RangeHigh, equivalent to {PROP:Range,2}). | The **RANGE** attribute (PROP:RANGE) specifies the valid range of data values the user may select in a SPIN control. RANGE also defines the range of values that are displayed in a PROGRESS control.This attribute works in conjunction with the STEP attribute on SPIN controls. On a SPIN control, the STEP attribute provides the user with the valid choices within the range. If no RANGE is set, and the FROM attribute is not used, PROP:RangeHigh returns "+Infinity", and PROP:RangeLow returns "-Infinity". When using the CREATE statement to create a SPIN control, these values are intentionally reversed, so that PROP:RangeHigh and PROP:RangeLow must be explicitly set. PROP:RangeLow and PROP:RangeHigh are also applicable for LIST and COMBO controls with vertical scrollbars (Read Only). PROP:RangeLow returns the lower limit of possible [[prop vscrollpos.htm|PROP:VScrollPos]] values, and PROP:RangeHigh returns upper limit. The limits or boundaries mentioned in the description of PROP:VScrollPos are correct only if number of records in the list box source is less or equal to number of visible rows (i.e., for page loaded browses). **Example:** **WinOne WINDOW,AT(0,0,160,400)** **        SPIN(@N4.2),AT(280,0,20,20),USE(SpinVar1),RANGE(.05,9.95),STEP(.05)** **        SPIN(@n3),AT(280,0,20,20),USE(SpinVar2),RANGE(5,995),STEP(5)** **       END** **See Also: [[spin declare a spinning list control .htm|SPIN]]**