QPix Command Reference
![]() |
![]() ![]() |
QPx_SetAreaScrollOffset(areaRef; hScroll; vScroll):error | |||
![]() |
areaRef | Longint | QPix area reference |
![]() |
hScroll | Longint | Horizontal scroll offset (pixels) |
![]() |
vScroll | Longint | Vertical scroll offset (pixels) |
![]() |
error | Longint | Error result |
Changes the scroll offsets of a scrollable QPix plug-in area. Use this command for procedural positionong the scrollbar thumbs of the area.
The QPix plug-in area is specified by areaRef. If areaRef is not a valid QPix plug-in area reference, qpx_paramErr is returned.
Parameters hScroll and vScroll specify the horizontal and vertical scroll offsets respectively. Both values range from zero to the maximum scroll offsets that can be retrieved using QPx_GetAreaScrollOffset.
In addition to the offset values in the normal ranges, hScroll and vScroll can be set to the following constants which cause alignment of the image in the plug-in area as described below.
For hScroll:
qpx_HorzAlignLeft | 0 | Left align the image horizontally in the plug-in area. |
qpx_HorzAlignCenter | -1 | Center align the image horizontally in the plug-in area. |
qpx_HorzAlignRight | -2 | Right align the image horizontally in the plug-in area. |
For vScroll:
qpx_VertAlignTop | 0 | Top align the image vertically in the plug-in area. |
qpx_VertAlignCenter | -1 | Center align the image vertically in the plug-in area. |
qpx_VertAlignBottom | -2 | Bottom align the image vertically in the plug-in area. |
Example
`Reset scrollbars to 0, 0 C_LONGINT($error) $error:=QPx_SetAreaScrollOffset (gQPixArea;0;0) |
Related commands
QPx_GetAreaScrollOffset | Returns the scroll offsets of a scrollable QPix plug-in area |