Scroll method (DataWindows)
Description
Scrolls the edit control of a DataWindow a specified number
of lines up or down.
Controls
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control |
Web ActiveX |
DataWindow control |
Syntax
[PowerBuilder]
1 |
long <span>dwcontrol</span>.<span>Scroll</span> ( long <span>number </span>) |
[Web ActiveX]
1 |
number <span>dwcontrol</span>.<span>Scroll</span> ( number <span>number </span>) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control. Scroll affects |
number |
A value specifying the direction and |
Return Values
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
This statement scrolls mle_Employee down
4 lines:
1 |
mle_Employee.<span>Scroll</span>(4) |
This statement scrolls mle_Employee up 4
lines:
1 |
mle_Employee.<span>Scroll</span>(<span>-</span>4) |
See Also
The following related methods implement scrolling in a DataWindow
or a PowerBuilder RichTextEdit control: