Category Archives: Application (Spark)

Setting the height of the control bar in a Spark Application container in Flex 4

The following example shows how you can set an explicit height on the Spark Application container control bar by setting the height property on the controlBarGroup skin part.

By default the control bar sizes itself to its content, so I don’t really recommend setting an explicit height unless you really want to.

Continue reading

Setting the background color on a Spark Application control bar in Flex 4

The following example shows how you can set the background fill color on a Spark Application container’s control bar in Flex 4 by setting the skinClass style and modifying the control bar fill:

<!-- layer 1: control bar fill -->
<s:rect left="1" right="1" top="1" bottom="2">
   <s:fill>
        <s:lineargradient rotation="90">
            <s:gradiententry color="0x333333"></s:gradiententry>
            <s:gradiententry color="0x666666"></s:gradiententry>
        </s:lineargradient>
   </s:fill>
</s:rect>

Full code after the jump.

Continue reading

Setting the control bar layout on a Spark Application container in Flex 4

In a previous example, “Adding a control bar to a Spark Application container in Flex 4″, we saw how you could add a control bar to a Spark Application container in Flex 4 by setting the controlBarContent property.

The following example shows how you can change the layout direction of a control bar in a Spark Application container in Flex 4 by setting the controlBarLayout property.

Full code after the jump.

Continue reading

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