ActionScript 2.0 Components Language Reference |
|
|
|
| List component > List.vScrollPolicy | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
listInstance.vScrollPolicy
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.
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.
|
|
|
|