Enlarge panel to 100% width and 100% height : Panel « 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 » PanelScreenshots 
Enlarge panel to 100% width and 100% height
Enlarge panel to 100% width and 100% height
            

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" implements="mx.managers.IHistoryManagerClient">
    <mx:Script>
    
    import mx.managers.HistoryManager;
    public function loadState(state:Object):void {
       if (state) {
           currentState = state.currentState;
           searchString = searchInput.text = state.searchString;
       }else {
           currentState = '';
       }
    }
    public function saveState():Object {
       var state:Object = {};
       state.currentState = currentState;
       state.searchString = searchString;
       return state;
    }
    [Bindable]
    public var searchString:String;

    public function doSearch():void {
        currentState = "results";
    }
    public function reset():void {
        currentState = '';
    }
  
    </mx:Script>
    <mx:states>
        <mx:State name="results">
            <mx:SetProperty target="{p}" name="width" value="100%" />
            <mx:SetProperty target="{p}" name="height" value="100%" />
            <mx:SetProperty target="{p}" name="title" value="Results" />
            <mx:AddChild relativeTo="{searchFields}">
               <mx:Button label="Reset" click="reset()" />
            </mx:AddChild>
            <mx:AddChild relativeTo="{p}">
               <mx:Label text="Search results for {searchString}" />
            </mx:AddChild>
        </mx:State>
    </mx:states>
    <mx:Panel id="p" title="Search" resizeEffect="Resize">
        <mx:HBox id="searchFields" defaultButton="{b}">
            <mx:TextInput id="searchInput" />
            <mx:Button id="b" label="Go" click="doSearch();" />
        </mx:HBox>
    </mx:Panel>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Adding Label to PanelAdding Label to Panel
2.Set Title for PanelSet Title for Panel
3.Panel with Padding
4.Using addElement() method to add Button to PanelUsing addElement() method to add Button to Panel
5.Padding setting for PanelPadding setting for Panel
6.Panel containerPanel container
7.Add Label to Panel
8.hidden while the Panel containers resizehidden while the Panel containers resize
9.Panel Scroll PolicyPanel Scroll Policy
10.Use SetProperty to change panel property valueUse SetProperty to change panel property value
11.Use Panel to hold controlsUse Panel to hold controls
12.Add labels to your PanelsAdd labels to your Panels
13. tag defines a Panel container<s:Panel> tag defines a Panel container
14.Panel with titlePanel with title
15.Set Panel width and height to 100%Set Panel width and height to 100%
16.Panel creationComplete and initializePanel creationComplete and initialize
17.Resize Panel with animationResize Panel with animation
18.Put controls onto a PanelPut controls onto a Panel
19.Add three Canvas containers to a Panel container, each Canvas having a different colorAdd three Canvas containers to a Panel container, each Canvas having a different color
20.To anchor the Panel perfectly in the center, set both fields to 0To anchor the Panel perfectly in the center, set both fields to 0
21.Replace the Panel containers with Form and FormItem containersReplace the Panel containers with Form and FormItem containers
22.Build Form with PanelBuild Form with Panel
23.Define a Panel container that contains a form as the top-level container in your application.Define a Panel container that contains a form as the top-level container in your application.
24.Panel container provides you with a mechanism for including a title bar, as in a standard GUI window.Panel container provides you with a mechanism for including a title bar, as in a standard GUI window.
25.Set Panel's creationPolicy property to auto, the default valueSet Panel's creationPolicy property to auto, the default value
26.Complex MultiPanelComplex MultiPanel
27.Two Creation PoliciesTwo Creation Policies
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.