<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:com="claire.com.*" viewSourceURL="srcview/index.html"> <mx:Script> <![CDATA[ import mx.controls.Alert; private function buttonHandler(event:Event):void { Alert.show("I've been clicked"); } ]]> </mx:Script> <com:ButtonPanel title="This is a ButtonPanel" width="50%" height="50%" horizontalCenter="0" verticalCenter="0" buttonClick="buttonHandler(event)" buttonLabel="This is my Button" buttonPadding="10"> <mx:Text condenseWhite="true" width="100%" paddingLeft="5" paddingRight="5" paddingTop="5"> <mx:htmlText> <![CDATA[ This is a ButtonPanel component. Useful when you want to place a button in the header of a panel. <br/><br/> A ButtonPanel component extends Panel and adds 2 new properties and 1 event. <br/><br/> <b>Properties</b><br/> <i><b>buttonLabel</b></i> : <i>String</i> - Defines the label for the button in the top corner<br/> <i><b>buttonPadding</b></i> : <i>Number</i> - Defines how much padding to provide in the header<br/> <br/><br/> <b>Event</b><br/> <i><b>buttonClick</b></i> : <i>Event</i> - Dispatched when the button is clicked<br/> <br/><br/> Right click to see source. <br/><br/> http://kerkness.blogspot.com ]]> </mx:htmlText> </mx:Text> </com:ButtonPanel> </mx:Application>