Remove child from Panel : Panel Children « 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 » Panel ChildrenScreenshots 
Remove child from Panel
Remove child from Panel
            

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    initialize="init(event)">
    <mx:Script>
    import mx.controls.Alert;
    import flash.events.MouseEvent;
    import flash.events.Event;
    public function init(e:Event):void {
        tw1.addEventListener(Event.CLOSE,closeWindow);
    }
    public function closeWindow(e:Event):void {
        p1.removeChild(tw1);
    }
  </mx:Script>
    <mx:Panel id="p1" title="Panel 1">
        <mx:TitleWindow id="tw1" width="300" height="300" showCloseButton="true" title="Title Window 1">
            <mx:Button label="Enter name" />
            <mx:TextArea id="ta1" />
        </mx:TitleWindow>
    </mx:Panel>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Children of Panel are not instantiated when the application is first loaded, but only after the user clicks the buttonChildren of Panel are not instantiated when the application is first loaded, but only after the user clicks the button
2.Add Sprite object as a child of UIComponent before adding it to PanelAdd Sprite object as a child of UIComponent before adding it to Panel
3.Panel with 3 ChildrenPanel with 3 Children
4.Add Panel as Child in StateAdd Panel as Child in State
5.Set the padding to 10 pixels, and the gap to 5 pixels, for the children of a Panel container:Set the padding to 10 pixels, and the gap to 5 pixels, for the children of a Panel container:
6.Four parts of a form, you define each child panel by using the Form containerFour parts of a form, you define each child panel by using the Form container
7.Children of panel containers are hidden while the containers resizeChildren of panel containers are hidden while the containers resize
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.