Do you want to create multiple tabs that look like the image below? Using Adobe Flex’s IDE called Flex Editor, you can easily drag ui components to the application area (the area colored gray). When I tried to add a canvas though to represent as another tab by dragging it to the application area, I hard somewhat of a hard time.
So what I did was code manually the MXML file. Just place the mx:Canvas tags inside the mx:TabNavigator and they will automatically be considered as tabbed panes.
|
1 2 3 4 5 6 7 8 9 10 11 |
<mx:TabNavigator x="69" y="12" width="663" height="345"> <mx:Canvas label="Column Chart" width="100%" height="100%"> <!-- any other layout here --> </mx:Canvas> <mx:Canvas label="Line Chart" width="100%" height="100%"> <!-- any other layout here --> </mx:Canvas> <mx:Canvas label="Area Chart" width="100%" height="100%"> <!-- any other layout here --> </mx:Canvas> </mx:TabNavigator> |
Pretty easy. The labels that you assign in the Canvas component will be the text that will appear in the tab.
