List.vScrollPolicy

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

listInstance.vScrollPolicy

Description

Property; a string that determines whether the list supports vertical scrolling. The value of this property can be "on", "off" or "auto". The value "auto" causes a scroll bar to appear when needed.

Example

The following example disables the vertical scroll bar for a list:

var my_list:mx.controls.List;

my_list.setSize(200, 60);
my_list.rowCount = 4;
my_list.vScrollPolicy = "off";

my_list.addItem({data:"flash", label:"Flash"});
my_list.addItem({data:"flex", label:"Flex"});
my_list.addItem({data:"coldfusion", label:"ColdFusion"});
my_list.addItem({data:"dreamweaver", label:"Dreamweaver"});
my_list.addItem({data:"fireworks", label:"Fireworks"});
my_list.addItem({data:"contribute", label:"Contribute"});
my_list.addItem({data:"breeze", label:"Breeze"});

var listListener:Object = new Object();
listListener.scroll = function(evt_obj:Object) {
    trace("my_list.vPosition = " + my_list.vPosition);
}
my_list.addEventListener("scroll", listListener);

You can still create scrolling by using List.vPosition, or by using the mouse or keyboard.

See also

List.vPosition