SetHScrollPos Method (WINDOW or PANEL)
PLBCMP GUI Only
The SetHScrollPos method sets the thumb position for a horizontal 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 horizontal 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 SetHScrollPos 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_LINELEFT |
0 |
left one unit. |
|
$SB_LINERIGHT |
1 |
right one unit. |
|
$SB_PAGELEFT |
2 |
left one page. |
|
$SB_PAGERIGHT |
3 |
right one page. |
|
$SB_LEFT |
6 |
to minimum left position. |
|
$SB_RIGHT |
7 |
to maximum right position. |
If the MINSCROLLH property size is less than or equal to the PANEL window width, the $SB_PAGELEFT and $SB_PAGERIGHT commands have no affect. If the MINSCROLLH property size is larger than the current PANEL width, 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
![]() |