flexlib :: library Documentation | All Packages | All Classes | Index | Frames No Frames |
ScrollableMenuBar

Package | flexlib.controls
Class | public class ScrollableMenuBar
Inheritance | ScrollableMenuBar mx.controls.MenuBar

ScrollableMenuBar is an extension of MenuBar that uses <codeph>flexlib.controls.ScrollableMenu</codeph> instead of using the original <controls>mx.controls.Menu</controls>. 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. <p>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.</p>

Default MXML Property `dataProvider`

See also

mx.controls.MenuBar

Public Properties

| 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

Public Methods

| Method | Defined By
--- | --- | ---
|  | ScrollableMenuBar() Constructor | ScrollableMenuBar
|  | getMenuAt(index:int):Menu [override] Overriding getMenuAt because the original method in MenuBar creates a new Menu object. | ScrollableMenuBar

Property Detail

arrowScrollPolicy | property

`arrowScrollPolicy:String`

The policy to show the up and down arrows at the top and bottom of the menu control. <p>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.</p>

Implementation
`public function get arrowScrollPolicy():String`
`public function set arrowScrollPolicy(value:String):void`

verticalScrollPolicy | property |

`verticalScrollPolicy:String`

Specifys the vertical scrolling policy for this control.

Implementation
`public function get verticalScrollPolicy():String`
`public function set verticalScrollPolicy(value:String):void`

See also

mx.core.ScrollPolicy
Constructor Detail

ScrollableMenuBar | () | Constructor

`public function ScrollableMenuBar()`

Constructor

Method Detail

getMenuAt | () | method

`override public function getMenuAt(index:int):Menu`

Overriding 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`

Returns

| `Menu`

Dimanche Juin 19 2011, 03:12 PM +02:00