| Package | flexlib.controls |
| Class | public class ScrollableMenuBar |
| Inheritance | ScrollableMenuBar mx.controls.MenuBar |
flexlib.controls.ScrollableMenu
instead of using the original . This allows us to specify a maxHeight for the
ScrollableMenuBar and that maxHeight will be used to determine the maxHeight for all the
menus that the component generates.
We only had to override the getMenuAt method to make it generate a ScrollableMenu. In order to set the event listeners of the newly created ScrollableMenu, the eventHandler method (which was a private method of MenuBar) was duplicated in this class.
Default MXML PropertydataProvider
See also
| Property | Defined By | ||
|---|---|---|---|
| arrowScrollPolicy : String
The policy to show the up and down arrows at the top and bottom of the menu
control. | ScrollableMenuBar | ||
| verticalScrollPolicy : String
Specifys the vertical scrolling policy for this control. | ScrollableMenuBar | ||
| Method | Defined By | ||
|---|---|---|---|
Constructor
| ScrollableMenuBar | ||
getMenuAt(index:int):Menu [override]
Overriding getMenuAt because the original method in
MenuBar creates a new Menu object. | ScrollableMenuBar | ||
| arrowScrollPolicy | property |
arrowScrollPolicy:StringThe policy to show the up and down arrows at the top and bottom of the menu control.
Possible values are the same as verticalScrollPolicy and can be ScrollPolicy.AUTO, ScrollPolicy.ON and ScrollPolicy.OFF. ScrollPolicy.ON shouldn't be used since it obstructs the menu items at the top and bottom of the list. Why did I allow it? I don't know.
public function get arrowScrollPolicy():String public function set arrowScrollPolicy(value:String):void| verticalScrollPolicy | property |
verticalScrollPolicy:StringSpecifys the vertical scrolling policy for this control.
public function get verticalScrollPolicy():String public function set verticalScrollPolicy(value:String):voidSee also
| ScrollableMenuBar | () | Constructor |
public function ScrollableMenuBar()Constructor
| getMenuAt | () | method |
override public function getMenuAt(index:int):MenuOverriding getMenuAt because the original method in MenuBar creates a new Menu object. We need to create a new ScrollableMenu instead, so we're forced to override this entire method.
Parameters
index:int |
Menu |