HSCROLL, VSCROLL, HVSCROLL (set scroll bars)

Top  Previous  Next





The HSCROLL, VSCROLL, and HVSCROLL attributes place scroll bars on an APPLICATION or WINDOW structure, or a COMBO, LIST, IMAGE, or TEXT control. HSCROLL (PROP:HSCROLL) adds a horizontal scroll bar to the bottom, VSCROLL (PROP:VSCROLL) adds a vertical scroll bar on the right side, and HVSCROLL adds both.

The HSCROLL attribute is also available for a SHEET control. This specifies the TABs display all on one row instead of multiple rows, no matter how many TABs there are. Right and left (or up and down) scroll buttons appear at both ends of the TABs to allow the user to scroll through all the TABs. PROP:BrokenTabs may be set to FALSE to turn off the "broken tab" visual effect.

The vertical scroll bar allows a mouse to scroll the display up or down. The horizontal scroll bar allows a mouse to scroll the control's display left or right. The scroll bars appear whenever any scrollable portion of the control lies outside the visible area on screen.

When you place VSCROLL on a LIST with the IMM attribute, the vertical scroll bar is always present, even when the list is not full. When the user clicks on the scroll bar, events are generated, but the list contents do not move (executable code should perform this task). You can interrogate the PROP:VscrollPos property to determine the scroll thumb's position in the range 0 (top) to 100 (bottom).

HSCROLL, VSCROLL, and HVSCROLL are also valid on a SPIN control and specify optional spin button arrangements from the default (one above the other, pointing up and down). HSCROLL places the spin buttons side by side pointing left and right, VSCROLL places the spin buttons one above the other pointing left and right, and HVSCROLL places the spin buttons side by side, pointing up and down.


!A Window with a horizontal scroll bar:




!A Window with a vertical scroll bar:




!A Window with both scroll bars: