Packageflexlib.controls
Classpublic class ScrollableArrowMenu
InheritanceScrollableArrowMenu Inheritance ScrollableMenu Inheritance mx.controls.Menu

An extension of ScrollableMenu that uses two arrow buttons placed at the top and bottom of the menu for scrolling.

See also

flexlib.controls.ScrollableMenu


Public Properties
 PropertyDefined by
  arrowScrollPolicy : String
Just like verticalScrollPolicy, except it controls how we display the up and down arrows for scrolling.
ScrollableArrowMenu
  scrollJump : Number = 1
Specifies how many rows to scroll each time.
ScrollableArrowMenu
  scrollSpeed : Number = 80
The delay between scrolling the list, so a smaller number here will increase the speed of the scrolling.
ScrollableArrowMenu
 InheritedverticalScrollPolicy : String
Override the verticalScrollPolicy so we can re-instate scrolling functionality.
ScrollableMenu
Public Methods
 MethodDefined by
  
Constructor
ScrollableArrowMenu
  
createMenu(parent:DisplayObjectContainer, mdp:Object, showRoot:Boolean = true):ScrollableArrowMenu
[static] We have to override the static function createMenu so that we create a ScrollableMenu instead of a normal Menu.
ScrollableArrowMenu
  
initialize():void
ScrollableArrowMenu
 Inherited
move(x:Number, y:Number):void
ScrollableMenu
 Inherited
show(xShow:Object = null, yShow:Object = null):void
ScrollableMenu
Protected Methods
 MethodDefined by
 Inherited
Overridden to reinstate proper scrolling functionality.
ScrollableMenu
  
We override createChildren so we can instantiate our up and down buttons and add them as children.
ScrollableArrowMenu
  
ScrollableArrowMenu
 Inherited
measure():void
We overide the measure() method because we need to check if the menu is going off the stage.
ScrollableMenu
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
We've got to layout the up and down buttons now.
ScrollableArrowMenu
Styles
 StyleDescriptionDefined by
  
downButtonStyleName
Type: String   CSS Inheritance: no
Name of CSS style declaration that specifies style for button used to control the vertical scrolling. This button appears on the bottom of the ScrollableArrowMenu control. The default value is undefined.
ScrollableArrowMenu
  
upButtonStyleName
Type: String   CSS Inheritance: no
Name of CSS style declaration that specifies style for button used to control the vertical scrolling. This button appears on the top of the ScrollableArrowMenu control. The default value is undefined.
ScrollableArrowMenu
Property detail
arrowScrollPolicyproperty
arrowScrollPolicy:String  [read-write]

Just like verticalScrollPolicy, except it controls how we display the up and down arrows for scrolling.

If this is set to ScrollPolicy.OFF we never show the arrows. If it's ScrollPolicy.ON we always show the arrows. And if it's ScrollPolicy.AUTO then we show the arrows if they are needed. OFF and AUTO are the only ones that should probably be used, since ON gets in the way of the first menu item in the list.

Implementation
    public function get arrowScrollPolicy():String
    public function set arrowScrollPolicy(value:String):void
scrollJumpproperty 
public var scrollJump:Number = 1

Specifies how many rows to scroll each time. Leaving it at 1 makes for the smoothest scrolling

scrollSpeedproperty 
public var scrollSpeed:Number = 80

The delay between scrolling the list, so a smaller number here will increase the speed of the scrolling. This is in ms.

Constructor detail
ScrollableArrowMenu()constructor
public function ScrollableArrowMenu()

Constructor

Method detail
createChildren()method
protected override function createChildren():void

We override createChildren so we can instantiate our up and down buttons and add them as children.

createMenu()method 
public static function createMenu(parent:DisplayObjectContainer, mdp:Object, showRoot:Boolean = true):ScrollableArrowMenu

We have to override the static function createMenu so that we create a ScrollableMenu instead of a normal Menu.

Parameters
parent:DisplayObjectContainer
 
mdp:Object
 
showRoot:Boolean (default = true)

Returns
ScrollableArrowMenu
createSubMenu()method 
protected override function createSubMenu():Menu

Returns
Menu
initialize()method 
public override function initialize():void
updateDisplayList()method 
protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

We've got to layout the up and down buttons now. They are overlaid on the list at the very top and bottom.

Parameters
unscaledWidth:Number
 
unscaledHeight:Number