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

Package | flexlib.controls
Class | public class ScrollablePopUpMenuButton
Inheritance | ScrollablePopUpMenuButton PopUpMenuButtonBase mx.controls.PopUpButton

ScrollablePopUpMenuButton is an extension of PopUpMenuButton that uses `flexlib.controls.ScrollableMenu` instead of using the original , which adds scrolling functionality to the menu.

This control extends `PopUpMenuButtonBase`, which was a copy/paste version of the original `mx.controls.PopUpMenuButton`. The only changes made to our copied version of the base class was to change some private variables and methods to protected, so we can access them here in our subclass.

MXML Syntax Show MXML Syntax
Hide MXML Syntax

The `<flexlib:ScrollablePopUpMenuButton>` tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:

    	  <flexlib:ScrollablePopUpMenuButton
    	    Properties
    	    verticalScrollPolicy="auto|on|off"
    	 	  arrowScrollPolicy="auto|on|off"
    	    maxHeight="undefined"
    	 	  />

See also

mx.controls.PopUpMenuButton

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | arrowScrollPolicy : String The scrolling policy that determines when to show the up and down buttons for scrolling. | ScrollablePopUpMenuButton
|  | dataDescriptor : IMenuDataDescriptor The data descriptor accesses and manipulates data in the data provider. | PopUpMenuButtonBase
|  | dataProvider : Object [override] | ScrollablePopUpMenuButton
|  | hideOnActivity : Boolean = true | ScrollablePopUpMenuButton
|  | iconField : String Name of the field in the dataProvider Array that contains the icon to show for each menu item. | PopUpMenuButtonBase
|  | iconFunction : Function A function that determines the icon to display for each menu item. | PopUpMenuButtonBase
|  | labelField : String Name of the field in the dataProvider Array that contains the text to show for each menu item. | PopUpMenuButtonBase
|  | labelFunction : Function A function that determines the text to display for each menu item. | PopUpMenuButtonBase
|  | maxHeight : Number [override] [write-only] Overriden to also set the maxHeight of the child menu control. | ScrollablePopUpMenuButton
|  | popUp : IUIComponent [override] [write-only] A reference to the pop-up Menu object. | PopUpMenuButtonBase
|  | rowCount : int Maximum number of rows visible in the Menu. | ScrollablePopUpMenuButton
|  | showRoot : Boolean Specifies whether to display the top-level node or nodes of the data provider. | PopUpMenuButtonBase
|  | verticalScrollPolicy : String Controls the vertical scrolling of the ScrollablePopUpMenuButton. | ScrollablePopUpMenuButton

Protected Properties

| Property | Defined By
--- | --- | ---
|  | explicitRowCountSet : Boolean = false Indicates if the row count property was explicitely set. | ScrollablePopUpMenuButton

Public Methods

| Method | Defined By
--- | --- | ---
|  | ScrollablePopUpMenuButton() Constructor | ScrollablePopUpMenuButton
|  | close():void [override] | ScrollablePopUpMenuButton

Events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | itemClick | Dispatched when a user selects an item from the pop-up menu. | PopUpMenuButtonBase

Styles
Hide Inherited Styles
Show Inherited Styles

| Style | Description | Defined By
--- | --- | --- | ---
|  | popUpStyleName | Type: String CSS Inheritance: no The name of a CSS style declaration used by the dropdown menu. | PopUpMenuButtonBase

Property Detail

arrowScrollPolicy | property

`arrowScrollPolicy:String`

The scrolling policy that determines when to show the up and down buttons for scrolling.

This property is independant of `verticalScrollPolicy`. The property here just serves a proxy to set the `arrowScrollPolicy` of the child menu component.

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

See also

flexlib.controls.ScrollableMenu

dataProvider | property |

`dataProvider:Object`[override]

Implementation
`public function get dataProvider():Object`
`public function set dataProvider(value:Object):void`

explicitRowCountSet | property |

`protected var explicitRowCountSet:Boolean = false`

Indicates if the row count property was explicitely set.

hideOnActivity | property |

`public var hideOnActivity:Boolean = true`

maxHeight | property |

`maxHeight:Number` [write-only] [override]

Overriden to also set the maxHeight of the child menu control.

This makes setting the maxHeight also set the maxHeight of the popUpMenu item.

Implementation
`public function set maxHeight(value:Number):void`

rowCount | property |

`rowCount:int`

Maximum number of rows visible in the Menu. This property works in conjunction with the maxHeight property. If this property is never set, the height of the menu is solely controlled using maxHeight. If this property is set, the menu will exactly have `rowCount` rows except if the number of rows times a row's height exceed maxHeight. In this case, the menu will have as many rows as possible without exceeding maxHeight. If this property has been set and it needs to revert to having the menu height solely controlled by maxHeight, set this property to -1.

The default value is `-1`.

Implementation
`public function get rowCount():int`
`public function set rowCount(value:int):void`

See also

maxHeight()

verticalScrollPolicy | property |

`verticalScrollPolicy:String`

Controls the vertical scrolling of the ScrollablePopUpMenuButton.

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

ScrollablePopUpMenuButton | () | Constructor

`public function ScrollablePopUpMenuButton()`

Constructor

Method Detail

close | () | method

`override public function close():void`

Mercredi Juillet 4 2012, 09:36 PM +02:00