Group element add event : Group « Container « Flex






Group element add event

Group element add event
           

<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    xmlns:s="library://ns.adobe.com/flex/spark">
    
    <mx:Script>
        
            import spark.components.Button;
            import spark.events.ElementExistenceEvent;
            private function handleElementAdd( evt:ElementExistenceEvent ):void
            {
                trace( (evt.element as Button).label + " has been added." ); 
            }
      
    </mx:Script>
    
    <s:Group elementAdd="handleElementAdd(event);">
        <mx:Button depth="100" label="button 1" />
        <mx:Button label="button 2" />
    </s:Group>
    
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Using multiple containers for more complex layouts
2.Using an HGroup inside of a panel to add a margin from edge
3.Use HGroup to layout Label, CheckBoxesUse HGroup to layout Label, CheckBoxes
4.Contain an HGroup (horizontal group) containerContain an HGroup (horizontal group) container
5.Spark HGroup ContainerSpark HGroup Container
6.Three images in an HGroup container.Three images in an HGroup container.
7.Creates a Button control inside the HGroup containerCreates a Button control inside the HGroup container
8.Spark Group Container Row HeightSpark Group Container Row Height
9.Use VGroup containerUse VGroup container
10.Force the VGroup containers to be included in the test script's hierarchyForce the VGroup containers to be included in the test script's hierarchy
11.Color property for a VGroup control is blue.Color property for a VGroup control is blue.
12.Use a Spark Group container with three child controls, where the Group container lays out its children verticallyUse a Spark Group container with three child controls, where the Group container lays out its children vertically
13.Show a Spark Group container that contains a child Image controlShow a Spark Group container that contains a child Image control
14.Add scroll bars to the Spark Group container by wrapping the container in the Scroller componentAdd scroll bars to the Spark Group container by wrapping the container in the Scroller component
15.Make Group container the child of the Scroller componentMake Group container the child of the Scroller component
16.Add element to Group with ActionScriptAdd element to Group with ActionScript
17.Set default vertical alignment of top for HorizontalLayout to align the children of a Group container to container bottomSet default vertical alignment of top for HorizontalLayout to align the children of a Group container to container bottom
18.Group container myGroup is the viewport for this scrollerGroup container myGroup is the viewport for this scroller
19.Controlling layout using view states groupsControlling layout using view states groups
20.Create a Group container with an Button controlCreate a Group container with an Button control
21.A Group container with four Button controls as its children:A Group container with four Button controls as its children:
22.containers Viewport Setcontainers Viewport Set
23.Grouping Graphic objects togetherGrouping Graphic objects together
24.Set rowHeight property to a pixel value large enough for all the childrenSet rowHeight property to a pixel value large enough for all the children
25.Group ButtonsGroup Buttons