QPx_SetAreaScrollOffset

QPx_SetAreaScrollOffset(areaRef; areaRef; areaRef):error
areaRef Longint QPix area reference
hScroll Longint Horizontal scroll offset (pixels)
vScroll Longint Vertical scroll offset (pixels)
error Longint Error result

Change the scroll offsets of a scrollable QPix plug-in area

Use this command for programmatically positioning 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 control image alignment within the plug-in area:

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 Get the scroll offsets of a scrollable QPix plug-in area