Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"> <!-- Custom contents of 'YourName.mxml' View Component --> </mx:Panel>
protected function onWhatever( event:Event ):void{ var yourName:YourName = new YourName(); yourName.width = 400; yourName.height = 300; yourName.title='This is a custom MXML panel component'; widget.widgetShell.addComponent( panel );}
<?xml version="1.0" encoding="utf-8"?><mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:v="co.za.hrtrac.modules.confirmwidget.view.components.*" > <v:MyPanel x="50" y="50"/></mx:Canvas>
protected function onProd( event:Event ):void{ // test panel created using actionscript var test:Panel = new Panel(); test.width = 400; test.height = 300; test.title='This is a tester'; confirmTimesheet.widgetShell.addComponent( test ); //this is for the custom component ConfirmCanvas.mxml var ConfirmCanvas:ConfirmCanvas = new ConfirmCanvas(); ConfirmCanvas.width = 400; ConfirmCanvas.height = 300; confirmTimesheet.widgetShell.addComponent( ConfirmCanvas ); }
var ConfirmCanvas:ConfirmCanvas = new ConfirmCanvas(); withvar ConfirmCanvas:Canvas = new Canvas();
var confirmCanvas:ConfirmCanvas = new ConfirmCanvas(); confirmCanvas.width = 400; confirmCanvas.height = 300; confirmTimesheet.widgetShell.addComponent( confirmCanvas );