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.

Default MXML PropertydataProvider

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
 InheriteddataProvider : Object
[override] [write-only]
ScrollableMenu
 InheritedhideOnActivity : Boolean = true
ScrollableMenu
 InheritedrowCount : int
[override] [write-only]
ScrollableMenu
  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] 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
 Inherited
hide():void
[override]
ScrollableMenu
  
initialize():void
[override]
ScrollableArrowMenu
 Inherited
move(x:Number, y:Number):void
[override]
ScrollableMenu
 Inherited
show(xShow:Object = null, yShow:Object = null):void
[override]
ScrollableMenu
Protected Methods
 MethodDefined By
 Inherited
clearMenu(row:IMenuItemRenderer):void
Clear the menu reference from the menu item renderer
ScrollableMenu
 Inherited
[override] Overridden to reinstate proper scrolling functionality.
ScrollableMenu
  
[override] We override createChildren so we can instantiate our up and down buttons and add them as children.
ScrollableArrowMenu
  
[override]
ScrollableArrowMenu
 Inherited
measure():void
[override] We overide the measure() method because we need to check if the menu is going off the stage.
ScrollableMenu
 Inherited
mouseUpHandler(event:MouseEvent):void
[override]
ScrollableMenu
 Inherited
onScroll(event:ScrollEvent):void
Callback function called when the menu scroll bar is scrolled
ScrollableMenu
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[override] We've got to layout the up and down buttons now.
ScrollableArrowMenu
Styles
 Style Description Defined 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

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
override protected 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 
override protected function createSubMenu():Menu

Returns
Menu
initialize()method 
override public function initialize():void

updateDisplayList()method 
override protected 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