Toggle button font size between null and 8 : ToggleButton « Components « 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 » Components » ToggleButtonScreenshots 
Toggle button font size between null and 8
Toggle button font size between null and 8
       
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
        public function toggleStyle():void {
            if (cb1.selected == true) {
                b1.setStyle("fontSize"8);
            else {
                b1.setStyle("fontSize"null);
            }
        }
      
            </mx:Script>
    <mx:Style>
    @namespace mx "http://www.adobe.com/2006/mxml";
    mx|Button 
       color: red; 
       fontSize: 25
    }
    </mx:Style>
    <mx:Button id="b1" label="Click Me" />
    <mx:CheckBox id="cb1" label="Set Style/Unset Style" click="toggleStyle()" selected="false" />
</mx:Application>

   
    
    
    
    
    
    
  
Related examples in the same category
1.A toggle button with an image for up, down, over, and disabled statesA toggle button with an image for up, down, over, and disabled states
2.Toggle Button color between blue and the defaultToggle Button color between blue and the default
3.Use ToggleBarButton to toggle two forms in ViewStackUse ToggleBarButton to toggle two forms in ViewStack
4.Toggle style buttonToggle style button
5.Mark a Button as Toggle.Mark a Button as Toggle.
6.Toggle data series when the user clicks on the Change Series button:Toggle data series when the user clicks on the Change Series button:
7.Toggle color of the Button control between blue and the default by using this techniqueToggle color of the Button control between blue and the default by using this technique
ww___w_.___j__av_a___2__s__.__c__o___m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.