Package | flexlib.controls |
Class | public class ScrollableArrowMenu |
Inheritance | ScrollableArrowMenu ![]() ![]() |
See also
Property | Defined 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 | ||
![]() | verticalScrollPolicy : String
Override the verticalScrollPolicy so we can re-instate scrolling functionality.
| ScrollableMenu |
Method | Defined 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 | ||
![]() |
move(x:Number, y:Number):void
| ScrollableMenu | |
![]() |
show(xShow:Object = null, yShow:Object = null):void
| ScrollableMenu |
Method | Defined by | ||
---|---|---|---|
![]() |
configureScrollBars():void
Overridden to reinstate proper scrolling functionality.
| ScrollableMenu | |
createChildren():void
We override createChildren so we can instantiate our up and down buttons
and add them as children.
| ScrollableArrowMenu | ||
createSubMenu():Menu
| ScrollableArrowMenu | ||
![]() |
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 |
arrowScrollPolicy | property |
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
scrollJump | property |
public var scrollJump:Number = 1
Specifies how many rows to scroll each time. Leaving it at 1 makes for the smoothest scrolling
scrollSpeed | property |
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.
ScrollableArrowMenu | () | constructor |
public function ScrollableArrowMenu()
Constructor
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.
Parametersparent:DisplayObjectContainer |
|
mdp:Object |
|
showRoot:Boolean (default = true )
|
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.
ParametersunscaledWidth:Number |
|
unscaledHeight:Number |