corresponding controls on the right remain a fixed size because their container is fixed. : Container « Container « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Container » ContainerScreenshots 
corresponding controls on the right remain a fixed size because their container is fixed.
corresponding controls on the right remain a fixed size because their container is fixed.
           

<!--
Code from Flex Documentation "Using Adobe Flex 4".

This user guide is licensed for use under the terms of the Creative Commons Attribution 
Non-Commercial 3.0 License. 

This License allows users to copy, distribute, and transmit the user guide for noncommercial 
purposes only so long as 
  (1proper attribution to Adobe is given as the owner of the user guide; and 
  (2any reuse or distribution of the user guide contains a notice that use of the user guide is governed by these terms. 
The best way to provide notice is to include the following link. 
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/

-->



<!-- components\CompSizingPercent.mxml -->
<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/mx">
    <fx:Script>
         
        private function logSizes():void 
            trace("HGroup: "+ hb1.width)
            trace("Label: "+ lb1.width)
            trace("Image: "+ img1.width)
            trace("Button: "+ b1.width)
        
      
    </fx:Script>
    <s:HGroup width="100%">
        <s:HGroup id="hb1" width="40%">
            <s:Label id="lb1" text="Hello" width="50" />
            <mx:Image id="img1" source="@Embed(source='a.jpg')"
                width="60%" />
            <s:Button id="b1" label="Button" width="40%"
                click="logSizes();" />
        </s:HGroup>
        <s:HGroup width="260">
            <s:Label text="Hello" width="50" />
            <mx:Image source="@Embed(source='a.jpg')" width="119" />
            <s:Button label="Button" />
        </s:HGroup>
    </s:HGroup>
</s:Application>

   
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Show setting the sizes of a container and its childShow setting the sizes of a container and its child
2.Show the percentage-based sizing behavior with absolute positioningShow the percentage-based sizing behavior with absolute positioning
3.Using Scroll barsUsing Scroll bars
4.Repositioning children at run timeRepositioning children at run time
5.Adding and removing components relativeTo another controlAdding and removing components relativeTo another control
6.includeInLayout="false"includeInLayout=
7.Minimum and Maximum Sizes and percentMinimum and Maximum Sizes and percent
8.Alignment to centerAlignment to center
9.Create constraints for the right edge and the bottom edge, using the properties right and bottomCreate constraints for the right edge and the bottom edge, using the properties right and bottom
10.Building within the main containerBuilding within the main container
11.Change the layout attribute to verticalChange the layout attribute to vertical
12.Constraint SizingConstraint Sizing
13.Padding ContainerPadding Container
14.includeInLayout and visible properties.includeInLayout and visible properties.
15.Get the number of direct child components in a containerGet the number of direct child components in a container
16.Add multiple child components, or a container that contains multiple child componentsAdd multiple child components, or a container that contains multiple child components
17.Scrolling Spark containersScrolling Spark containers
18.Set clipAndEnableScrolling property to true to clip the container's children to the container boundariesSet clipAndEnableScrolling property to true to clip the container's children to the container boundaries
19.Creating and removing a child of a containerCreating and removing a child of a container
20.Wrap the Spark container in an MX container on in a Spark NavigatorWrap the Spark container in an MX container on in a Spark Navigator
21.Enable Scrolling in a ContainerEnable Scrolling in a Container
22.Example: Determining a container and child sizesExample: Determining a container and child sizes
23.uses the layout property of the container to set its layout to the HorizontalLayout class:uses the layout property of the container to set its layout to the HorizontalLayout class:
24.A NavigatorContent must be the child of an MX navigator containerA NavigatorContent must be the child of an MX navigator container
25.Use an inline item renderer with the SkinnableDataContainer containerUse an inline item renderer with the SkinnableDataContainer container
26.Use tag to define an inline item renderer for two containersUse <fx:Component> tag to define an inline item renderer for two containers
27.Scale Children of a ContainerScale Children of a Container
28.Creating a Box container with a vertical layoutCreating a Box container with a vertical layout
29.Grid container with three rows and three columnsGrid container with three rows and three columns
30.Container InheritanceContainer Inheritance
31.Create a Button control and adds it to a containerCreate a Button control and adds it to a container
32.Add a graphic element to the container to define a background for the buttonsAdd a graphic element to the container to define a background for the buttons
33.size and position of each component is carefully calculated to ensure that none of the components overlapsize and position of each component is carefully calculated to ensure that none of the components overlap
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.