User Guide
UIScrollBar.lineScrollSize 1401
UIScrollBar.lineScrollSize
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
scrollBarInstance.lineScrollSize
Description
Property; gets or sets the number of lines or pixels scrolled when the user clicks the arrow
buttons of the UIScrollBar component. If the scroll bar is oriented vertically, the value is a
number of lines. If the scroll bar is oriented horizontally, the value is a number of pixels.
The default value is 1.
Example
The following example creates a scroll bar to scroll text in a text field, which it loads from a
web page. The example sets the
lineScrollSize property to scroll two lines at a time for
each click of an arrow button:
/**
Requires:
- UIScrollBar component in library
*/
this.createTextField("my_txt", 10, 10, 20, 200, 100);
my_txt.wordWrap = true;
this.createClassObject(mx.controls.UIScrollBar, "my_sb", 20);
// Set the target text field.
my_sb.setScrollTarget(my_txt);
// Size it to match the text field.
my_sb.setSize(16, my_txt._height);
// Move it next to the text field.
my_sb.move(my_txt._x + my_txt._width, my_txt._y);
// Scroll 2 lines per click on scroll arrow.
my_sb.lineScrollSize = 2;
// Scroll 5 lines per click on scroll track.
my_sb.pageScrollSize = 5;