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

Package | flexlib.controls
Class | public class CanvasButton
Inheritance | CanvasButton mx.controls.Button
Implements | mx.core.IContainer
Subclasses | CanvasButtonAccordionHeader

A Button control that allows you to add any UI components to the Button via MXML. <p>The CanvasButton is an extension of Button that lets you set the contents of the Button to any UI components, as opposed to only a single icon and label like the normal Button control allows.</p> <p> Example usage: <pre> <flexlib:CanvasButton width="150" > <mx:VBox height="100%" width="100%" verticalGap="0"> <mx:Label text="This is a" width="100%" textAlign="left" /> <mx:Label text="crazy" textAlign="center" fontSize="20" fontStyle="italic" fontWeight="bold" width="100%" /> <mx:Label text="button!" width="100%" textAlign="right" /> </mx:VBox> </flexlib:CanvasButton> </pre> </p>

See also

mx.controls.Button

Public Properties

| Property | Defined By
--- | --- | ---
|  | buttonMode : Boolean [override] | CanvasButton
|  | childDescriptors : Array [write-only] Since this class implements IContainer, when it is created it's parent container will set the childDescriptors property with UIComponentDescriptor objects. | CanvasButton
|  | creatingContentPane : Boolean | CanvasButton
|  | defaultButton : IFlexDisplayObject | CanvasButton
|  | horizontalScrollPolicy : String | CanvasButton
|  | horizontalScrollPosition : Number | CanvasButton
|  | mouseChildren : Boolean [override] | CanvasButton
|  | verticalScrollPolicy : String | CanvasButton
|  | verticalScrollPosition : Number | CanvasButton
|  | viewMetrics : EdgeMetrics | CanvasButton

Protected Properties

| Property | Defined By
--- | --- | ---
|  | _creatingContentPane : Boolean | CanvasButton
|  | _defaultButton : IFlexDisplayObject | CanvasButton
|  | _horizontalScrollPosition : Number | CanvasButton
|  | _verticalScrollPosition : Number | CanvasButton
|  | _viewMetrics : EdgeMetrics | CanvasButton

Public Methods

| Method | Defined By
--- | --- | ---
|  | CanvasButton() | CanvasButton

Protected Methods

| Method | Defined By
--- | --- | ---
|  | createChildren():void [override] | CanvasButton
|  | measure():void [override] | CanvasButton
|  | updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void [override] | CanvasButton

Property Detail

_creatingContentPane | property

`protected var _creatingContentPane:Boolean`

_defaultButton | property |

`protected var _defaultButton:IFlexDisplayObject`

_horizontalScrollPosition | property |

`protected var _horizontalScrollPosition:Number`

_verticalScrollPosition | property |

`protected var _verticalScrollPosition:Number`

_viewMetrics | property |

`protected var _viewMetrics:EdgeMetrics`

buttonMode | property |

`buttonMode:Boolean`[override]

Implementation
`public function get buttonMode():Boolean`
`public function set buttonMode(value:Boolean):void`

childDescriptors | property |

`childDescriptors:Array` [write-only]

Since this class implements IContainer, when it is created it's parent container will set the childDescriptors property with UIComponentDescriptor objects. These are used to create the child components that are set in MXML.

Implementation
`public function set childDescriptors(value:Array):void`

creatingContentPane | property |

`creatingContentPane:Boolean`

Implementation
`public function get creatingContentPane():Boolean`
`public function set creatingContentPane(value:Boolean):void`

defaultButton | property |

`defaultButton:IFlexDisplayObject`

Implementation
`public function get defaultButton():IFlexDisplayObject`
`public function set defaultButton(value:IFlexDisplayObject):void`

horizontalScrollPolicy | property |

`horizontalScrollPolicy:String`

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

horizontalScrollPosition | property |

`horizontalScrollPosition:Number`

Implementation
`public function get horizontalScrollPosition():Number`
`public function set horizontalScrollPosition(value:Number):void`

mouseChildren | property |

`mouseChildren:Boolean`[override]

Implementation
`public function get mouseChildren():Boolean`
`public function set mouseChildren(value:Boolean):void`

verticalScrollPolicy | property |

`verticalScrollPolicy:String`

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

verticalScrollPosition | property |

`verticalScrollPosition:Number`

Implementation
`public function get verticalScrollPosition():Number`
`public function set verticalScrollPosition(value:Number):void`

viewMetrics | property |

`viewMetrics:EdgeMetrics`

Implementation
`public function get viewMetrics():EdgeMetrics`
`public function set viewMetrics(value:EdgeMetrics):void`
Constructor Detail

CanvasButton | () | Constructor

`public function CanvasButton()`

Method Detail

createChildren | () | method

`override protected function createChildren():void`

measure | () | method |

`override protected function measure():void`

updateDisplayList | () | method |

`override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void`

Parameters

| `unscaledWidth:Number`
| `unscaledHeight:Number`

Mercredi Juillet 6 2011, 09:45 PM +02:00