SetVScrollPos Method (WINDOW or PANEL)
PLBCMP GUI Only
The SetVScrollPos method sets the thumb position for a vertical scrollbar that is used for a PANEL or WINDOW object. The method uses the following format:
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A WINDOW or PANEL object to be accessed.
return
Optional. A Numeric Variable that receives the pass or fail result for the execution of the method.
pos
Required. A Numeric Variable or decimal value that gives the position command command to set the vertical scrollbar for an object.
Flags Affected: OVER, ZERO
Note the following:
The ZERO flag is set when the {return} value is zero. The {return} value is zero when the method execution is successful. If the {return} value is non-zero, the SetVScrollPos method execution has failed.
The OVER flag is set if the {return} variable is too small and the returned value is truncated.
The {pos} command values are derived from the Windows definitions used to control scrollbars. The acceptable values are defined below. Any other {pos} values are ignored and cause a non-zero {return} value to be returned.
|
Constant |
Value |
Scroll... |
|
$SB_LINEUP |
0 |
left one unit. |
|
$SB_LINEDOWN |
1 |
right one unit. |
|
$SB_PAGEUP |
2 |
left one page. |
|
$SB_PAGEDOWN |
3 |
right one page. |
|
$SB_TOP |
6 |
to minimum top position. |
|
$SB_BOTTOM |
7 |
to maximum bottom position. |
If the MINSCROLLV property size is less than or equal to the PANEL window height, the $SB_PAGEUP and $SB_PAGEDOWN commands have no affect. If the MINSCROLLV property size is larger than the current PANEL height, the page size is calculated and used.
This method is not available when using the PL/B Web Server.
See Also: Method Syntax, Panel Methods, WINDOW Methods
![]() |