Package | flexlib.controls |
Class | public class ScrollableArrowMenu |
Inheritance | ScrollableArrowMenu ![]() ![]() |
Default MXML PropertydataProvider
See also
Property | Defined By | ||
---|---|---|---|
arrowScrollPolicy : String
Just like verticalScrollPolicy, except it controls how we display the up and down arrows
for scrolling. | ScrollableArrowMenu | ||
![]() | dataProvider : Object [override] [write-only] | ScrollableMenu | |
![]() | hideOnActivity : Boolean = true | ScrollableMenu | |
![]() | rowCount : 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 | ||
![]() | verticalScrollPolicy : String [override]
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 | ||
![]() | hide():void [override]
| ScrollableMenu | |
initialize():void [override] | ScrollableArrowMenu | ||
![]() | move(x:Number, y:Number):void [override]
| ScrollableMenu | |
![]() | show(xShow:Object = null, yShow:Object = null):void [override] | ScrollableMenu |
Method | Defined By | ||
---|---|---|---|
![]() | clearMenu(row:IMenuItemRenderer):void
Clear the menu reference from the menu item renderer
| ScrollableMenu | |
![]() | configureScrollBars():void [override]
Overridden to reinstate proper scrolling functionality. | ScrollableMenu | |
createChildren():void [override]
We override createChildren so we can instantiate our up and down buttons
and add them as children. | ScrollableArrowMenu | ||
createSubMenu():Menu [override] | ScrollableArrowMenu | ||
![]() | measure():void [override]
We overide the measure() method because we need to check if the menu is going off
the stage. | ScrollableMenu | |
![]() | mouseUpHandler(event:MouseEvent):void [override] | ScrollableMenu | |
![]() | 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 |
arrowScrollPolicy | property |
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.
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 |
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 )
|
ScrollableArrowMenu |
createSubMenu | () | method |
override protected function createSubMenu():Menu
ReturnsMenu |
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 |