Use SetStyle to change panel style value : Panel Style « 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 StyleScreenshots 
Use SetStyle to change panel style value
Use SetStyle to change panel style value
            

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:states>
        <mx:State name="Register">
            <mx:SetProperty target="{loginPanel}" name="title" value="Register" />
            <mx:SetStyle target="{loginPanel}" name="backgroundColor" value="0x00FFFF" />
            <mx:SetProperty target="{loginButton}" name="label" value="Register" />
            <mx:SetStyle target="{loginButton}" name="color" value="0xFFFF00" />
        </mx:State>
    </mx:states>
    <mx:Panel id="loginPanel" title="Login" horizontalScrollPolicy="off" verticalScrollPolicy="off">
        <mx:Form id="loginForm">
            <mx:Button label="Login" id="loginButton" />
        </mx:Form>
        <mx:ControlBar width="100%">
            <mx:Button label="Change State"
                click="currentState = currentState=='Register' ? '':'Register';" />
        </mx:ControlBar>
    </mx:Panel>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.A opaque panelA opaque panel
2.Panel TransparencyPanel Transparency
3.Floating panelFloating panel
4.Panel CornersPanel Corners
5.A transparent panelA transparent panel
6.Set paddingTop, paddingBottom, paddingLeft, paddingRight for PanelSet paddingTop, paddingBottom, paddingLeft, paddingRight for Panel
7.Sliding a panel in and out when the button is clickedSliding a panel in and out when the button is clicked
w_w___w___.__j_a_v__a2_s._co_m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.