List.hScrollPolicy

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

listInstance.hScrollPolicy

Description

Property; a string that determines whether the horizontal scroll bar is displayed; the value can be "on" or "off". The default value is "off". The horizontal scroll bar does not measure text; you must set a maximum horizontal scroll position (see List.maxHPosition).

NOTE

List.hScrollPolicy does not support the value "auto".

Example

The following code enables the list to scroll horizontally up to 200 pixels. To try this code, drag a List component to the Stage and give it the instance name my_list. Add the following code to Frame 1 in the timeline:

var my_list:mx.controls.List;

my_list.setSize(150, 100);
my_list.hScrollPolicy = "on";
my_list.maxHPosition = 200;

my_list.addItem({data:'flash', label:'Flash'});
my_list.addItem({data:'dreamweaver', label:'Dreanweaver'});
my_list.addItem({data:'coldfusion', label:'ColdFusion'});

See also

List.hPosition, List.maxHPosition