ControlBar for a Panel : Panel ControlBar « Container « Flex






ControlBar for a Panel

ControlBar for a Panel
            

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
    <mx:Script>
        
            private function calculate(event:Event):void
            {               
                var result:Number = Number(priceTxt.text) * (Number(ivaTxt.text) / 100);
                totalTxt.text = totalF.format(result.toString());               
            }
            
      
    </mx:Script>
    
    <mx:CurrencyFormatter id="totalF" 
        currencySymbol=""
        precision="2"
        decimalSeparatorFrom=","
        decimalSeparatorTo=","
        thousandsSeparatorFrom="."
        thousandsSeparatorTo="."
        useThousandsSeparator="true" />
    
    <mx:Panel title="Formatter" width="477" height="252">
        <mx:Form>
            <mx:TextInput id="priceTxt"/>
            <mx:TextInput id="ivaTxt"/>
            <mx:FormItem label="">
                <mx:Button label="Calculate" click="calculate(event)" />
            </mx:FormItem>
            
        </mx:Form>
        
        <mx:ControlBar>
        
            <mx:Label text="This is your value: " />                
            <mx:TextInput id="totalTxt"  editable="false"/>
            
        </mx:ControlBar>
        
    </mx:Panel>
    
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1. as child tag of an <mx:ControlBar> as child tag of an <mx:Panel>
2.Panel.controlBarContent defines the controls that appear in the control bar areaPanel.controlBarContent defines the controls that appear in the control bar area
3.ControlBar for PanelControlBar for Panel
4.Specify tag as the last child tag of an tagSpecify <mx:ControlBar> tag as the last child tag of an <mx:Panel> tag
5.Add ControlBar container dynamically to a Panel containerAdd ControlBar container dynamically to a Panel container