content/tourdeflex/spark/containers/GroupExample.mxml (42 lines of code) (raw):

<?xml version="1.0" encoding="utf-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo"> <s:layout> <s:BasicLayout id="bl"/> </s:layout> <s:Panel id="mainPanel" title="Group Sample" width="100%" height="100%"> <s:layout> <s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10" /> </s:layout> <s:HGroup> <s:Group> <!-- Default layout is basic, therefore constraints are used for placement --> <s:Label text="Apples" top="0"/> <s:Label text="Oranges" top="13"/> <s:Label text="Bananas" top="26"/> </s:Group> <s:Group id="horizontalPanel"> <s:layout> <s:HorizontalLayout/> </s:layout> <s:Label text="Apples" /> <s:Label text="Oranges" /> <s:Label text="Bananas" /> </s:Group> <s:Group id="vericalPanel"> <s:layout> <s:VerticalLayout/> </s:layout> <s:Label text="Apples" /> <s:Label text="Oranges" /> <s:Label text="Bananas" /> </s:Group> </s:HGroup> <s:Label verticalAlign="justify" left="3" bottom="30" width="100%" text="The Group class defines a container that includes a content area for its children. The Group has a basic layout by default, which means it lays out elements within the group by their individual constraints. You can specify a different layout to use within the group such as shown in the inner groups (basic, horizontal and vertical layout groups)."/> </s:Panel> </s:Application>