Monthly Archives: August 2009

Using a CFF embedded font with a Halo DataGrid control in Flex 4

The following example shows how you can use a CFF embedded font with a Halo DataGrid container by setting the itemRenderer property or defaultDataGridItemRenderer style to the mx.controls.dataGridClasses.TLFDataGridItemRenderer class.

Full code after the jump.

Continue reading Using a CFF embedded font with a Halo DataGrid control in Flex 4

Setting the horizontal spacing between an item label and icon in a LinkBar control in Flex

In a previous example, “Setting the horizontal spacing between items in a LinkBar control in Flex”, we saw how you could set the horizontal spacing between items in a Flex LinkBar control by setting the horizontalGap style.

The following example shows how you can control the spacing between a LinkBar control’s individual LinkButton control’s label and icon by setting the horizontalGap style on the LinkBar control’s linkButtonStyleName style.

Full code after the jump.

Continue reading Setting the horizontal spacing between an item label and icon in a LinkBar control in Flex

Setting the fill colors on a Halo Button control in Flex 4

The following example shows how you can set the fill colors on a Halo Button control (with default Spark skin) in Flex 4 by creating a custom skin and setting the gradient colors in the fill layer:

<!-- layer 2: fill -->
<s:rect left="1" right="1" top="1" bottom="1"
        radiusX="2" radiusY="2">
    <s:fill>
        <s:lineargradient rotation="90">
            <s:gradiententry color="red"
                    color.overStates="haloGreen"
                    alpha="0.85"
                    alpha.selectedOver="1"></s:gradiententry>
            <s:gradiententry color="haloOrange"
                    color.overStates="haloBlue"
                    alpha="0.85"
                    alpha.selectedOver="1"></s:gradiententry>
        </s:lineargradient>
    </s:fill>
</s:rect>

Full code after the jump.

Continue reading Setting the fill colors on a Halo Button control in Flex 4

Setting the content background color on an MX Accordion container in Flex 4

In a previous example, “Setting the base color on an MX Accordion container in Flex 4”, we saw how you could set the base color on an MX Accordion container in Flex 4 by setting the baseColor style.

The following example shows how you can set the content background color on an MX Accordion container in Flex 4 by setting the contentBackgroundColor style.

Continue reading Setting the content background color on an MX Accordion container in Flex 4

Disabling a Spark Application container in Flex 4

In a previous example, “Disabling an Application in Flex 3”, we saw how you could disable an entire Flex Application in Flex 3 by setting the Boolean enabled property on the application object.

The following example shows how you can disable an entire Spark Application in Flex 4 by setting the Boolean enabled property on the static FlexGlobals.topLevelApplication object.

Continue reading Disabling a Spark Application container in Flex 4