Register an event listener in MXML for Accordion change event : Accordion « 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 » AccordionScreenshots 
Register an event listener in MXML for Accordion change event
Register an event listener in MXML for Accordion change event
      
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="300"
    height="280">
    <mx:Script>
        
            import mx.controls.Alert;
            private function handleAccChange():void {
                Alert.show("You just changed views");
            }
          
    </mx:Script>
    <mx:Accordion id="myAcc" height="60" width="200" change="handleAccChange();">
        <mx:HBox label="Box 1">
            <mx:Label text="Put Some Stuff Here" />
        </mx:HBox>
        <mx:HBox label="Box 2">
            <mx:Label text="Put Different Stuff Here" />
        </mx:HBox>
    </mx:Accordion>
</mx:Application>

   
    
    
    
    
    
  
Related examples in the same category
1.Creating an accordion navigatorCreating an accordion navigator
2.Accordion container, IndexChangedEventAccordion container, IndexChangedEvent
3.Define an event listener for Accordion initialize eventDefine an event listener for Accordion initialize event
4.Creating and removing children of an Accordion containerCreating and removing children of an Accordion container
5.Put Form inside an Accordion container
6.Creating an Accordion containerCreating an Accordion container
7.Open last panel in the Accordion containerOpen last panel in the Accordion container
8.Set a different text color for each Accordion buttonsSet a different text color for each Accordion buttons
9.Register an event listener in MXML that is processed when you change views in an Accordion container.Register an event listener in MXML that is processed when you change views in an Accordion container.
10.History management is Enabled for this AccordionHistory management is Enabled for this Accordion
11.History management is disabled for this AccordionHistory management is disabled for this Accordion
12.Define an event listener for the initialize event, which is dispatched when the user first navigates to Pane 2 of an MX Accordion navigator containerDefine an event listener for the initialize event, which is dispatched when the user first navigates to Pane 2 of an MX Accordion navigator container
13.Using the Spark NavigatorContent container as a child of an Accordion containerUsing the Spark NavigatorContent container as a child of an Accordion container
14.Accordion Button NavigationAccordion Button Navigation
15.Set a different text color for each of the Accordion buttonsSet a different text color for each of the Accordion buttons
16.Set Accordion creationPolicy to all, which instructs the container to instantiate all controls for every panel in the navigator container when the application startsSet Accordion creationPolicy to all, which instructs the container to instantiate all controls for every panel in the navigator container when the application starts
17.Accordion is opened to the panel corresponding to the value of the index fragmentAccordion is opened to the panel corresponding to the value of the index fragment
18.Use selectedChild propertyUse selectedChild property
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.