27
Aug
07

Highlighting the Accordion container’s currently selected header

The following example shows how you can set the Accordion container’s selectedFillColors style to highlight the currently selected header.

Full code after the jump.

View MXML

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/08/27/highlighting-the-accordion-containers-currently-selected-header/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:Style>
        Accordion {
            selectedFillColors: haloBlue, haloBlue;
        }
    </mx:Style>

    <mx:Accordion width="400" height="120">
        <mx:VBox id="child1" label="Child 1" />
        <mx:VBox id="child2" label="Child 2" />
        <mx:VBox id="child3" label="Child 3" />
    </mx:Accordion>

</mx:Application>

View source is enabled in the following example.

The previous example was built using Flex 2.0.1 Hotfix 2. This style seems to be deprecated in Flex 3.


1 Response to “Highlighting the Accordion container's currently selected header”


  1. 1 Adam Adamczyk Feb 25th, 2008 at 1:24 pm

    Indeed in Flex 3 this example won’t work.

    hereby updated example

    .accHeader {
    selectedFillColors: haloBlue, haloBlue;
    }

Leave a Reply

This blog is terrible at eating HTML tags. If you plan on posting code/XML, please escape your "<" characters as "&lt;" and your ">" characters as "&gt;".




Badge Farm

  • Powered by Redoable 1.2
  • Cornify
  • Feeds burnt by Feedburner
  • Feed