The following example shows how you can set the open duration for a Flex Accordion container by setting the openDuration style.
Full code after the jump.
Continue reading ‘Setting the open duration for an Accordion container in Flex’
The following example shows how you can set the open duration for a Flex Accordion container by setting the openDuration style.
Full code after the jump.
Continue reading ‘Setting the open duration for an Accordion container in Flex’
Loyal reader, Madhu, asked the following question the other day:
Is it possible to color individual headers of the accordion?
Well, I played around with it briefly this evening and it seems that you can get individual accordion headings using the Accordion class’s getHeaderAt() method, then it is just a matter of saving that reference in a variable, or applying a style directly to the returned Button reference.
The example itself is pretty simple, but I’m sure the same principles apply to other styles as well.
Full code after the jump.
Continue reading ‘Setting styles on individual Flex Accordion headers’
A recent comment asked how you can indent the Accordion header text as setting the paddingLeft style wasn’t working as expected for them. Well, as it turns out, you need to set the paddingLeft style directly on the AccordionHeader style (Flex 2 and 3) or create a new style with paddingLeft style specified and use the headerStyleName style (Flex 3 only).
Full code after the jump.
The following example shows how you can set some of the deprecated styles in the Accordion container (such as fillAlphas, fillColors, and selectedFillColors) by using the headerStyleName style.
Full code after the jump.
Continue reading ‘Customizing the Accordion header in Flex 3′
The following example shows how you can create a simple, inline header renderer in Flex which uses the Button control for a Flex Accordion header.
Full code after the jump.
Continue reading ‘Creating a simple Flex Accordion inline header renderer’
The following example shows how you can add and remove children from a Flex Accordion container by using the addChild() and removeChild() methods.
Full code after the jump.
Continue reading ‘Dynamically adding new children to a Flex Accordion container’
Hot on the heels of my previous post, “Programmatically changing a Flex Accordion container’s selected index“, comes a similar example, but this time opening an accordion item by child instead of a numeric index.
Full code after the jump.
Continue reading ‘Programmatically changing a Flex Accordion container’s selected child’
The following example shows how you can change the currently selected child in an Accordion container using ActionScript by setting the accordion’s selectedIndex property.
Full code after the jump.
Continue reading ‘Programmatically changing a Flex Accordion container’s selected index’
The following example shows how you can use the textAlign style to control the text alignment of a label in an Accordion header.
Full code after the jump.
Continue reading ‘Changing text alignment in an Flex Accordion header’
The following example shows how you can control the easing duration and easing function that the Accordion container uses when changing the visible child container.
Full code after the jump.
Continue reading ‘Changing the Accordion container’s easing duration and easing functions’
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.
Continue reading ‘Highlighting the Accordion container’s currently selected header’
The following example demonstrates how you can make an Accordion container adjust its width to match the contents of the currently selected child.
Full code after the jump.
Continue reading ‘Resizing a Flex Accordion container to fit its contents’
The following example demonstrates how you can add embedded icons to a Flex Accordion container.
Full code after the jump.