SaveAsAscii  ScrollFirstPage

Chapter 9: Methods for the DataWindow Control

Scroll

Description

Scrolls the edit control of a DataWindow a specified number of lines up or down.

Syntax

long dwcontrol.Scroll ( long number )

Argument

Description

dwcontrol

A reference to a DataWindow control. Scroll affects the edit control of the DataWindow.

number

A value specifying the direction and number of lines you want to scroll. To scroll down, use a positive value. To scroll up, use a negative value.

Returns

Scroll returns the line number of the first visible line in dwcontrol if it succeeds. Scroll returns -1 if an error occurs. If any argument’s value is NULL, Scroll returns NULL.

Usage

If the number of lines left in the list is less than the number of lines that you want to scroll, then Scroll will scroll to the beginning or end, depending on the direction specified.

Examples

Example 1

This statement scrolls mle_Employee down 4 lines:

mle_Employee.Scroll(4)

Example 2

This statement scrolls mle_Employee up 4 lines:

mle_Employee.Scroll(-4)

See also

The following related methods implement scrolling in a DataWindow:





Copyright © 2004. Sybase Inc. All rights reserved. ScrollFirstPage

View this book as PDF