Archive for the 'VBox' Category

27
Feb

Setting effects with ActionScript in Flex

The following example shows how you can set effects on a Flex Image control using ActionScript by setting the showEffect and hideEffect effects using the setStyle() method.

Full code after the jump.

Continue reading ‘Setting effects with ActionScript in Flex’

02
Feb

Clipping a Flex container’s content using the clipContent property

The following example shows how you can clip a container’s content in Flex by setting the clipContent property.
According to the Flex 3 documentation for the Container class’s clipContent property:

Whether to apply a clip mask if the positions and/or sizes of this container’s children extend outside the borders of this container. If false, the children of this container remain visible when they are moved or sized outside the borders of this container. If true, the children of this container are clipped.
If clipContent is false, then scrolling is disabled for this container and scrollbars will not appear. If clipContent is true, then scrollbars will usually appear when the container’s children extend outside the border of the container.
The default value is true.

Full code after the jump.

Continue reading ‘Clipping a Flex container’s content using the clipContent property’

05
Jan

Changing a VBox container’s background size in Flex

The following example shows how you can set a background image and background size for a Flex VBox container by setting the backgroundImage, and backgroundSize styles.

Full code after the jump.

Continue reading ‘Changing a VBox container’s background size in Flex’

05
Jan

Changing a VBox container’s background alpha in Flex

The following example shows how you can set both an background image and background color and change its alpha to for a Flex VBox container by setting the backgroundImage, backgroundColor, and backgroundAlpha styles.

Full code after the jump.

Continue reading ‘Changing a VBox container’s background alpha in Flex’

05
Jan

Changing a VBox container’s background image attachment in Flex

The following example shows how you can set a background image and change its attachment to scrolling or fixed for a Flex VBox container by setting the backgroundImage and backgroundAttachment styles.

Full code after the jump.

Continue reading ‘Changing a VBox container’s background image attachment in Flex’

03
Jan

Setting the vertical gap between items in a Flex VBox container

The following example shows how you can control the amount of vertical spacing between items in a VBox container by setting the verticalGap style.

Full code after the jump.

Continue reading ‘Setting the vertical gap between items in a Flex VBox container’

09
Nov

Setting a Flex container’s vertical scroll policy

The following example shows how you can use the verticalScrollPolicy property on a Flex VBox container to control the appearance of the vertical scroll bar when the container’s contents exceed the dimensions of the container.

Full code after the jump.

Continue reading ‘Setting a Flex container’s vertical scroll policy’

24
Aug

Toggling a Flex container’s visibility using states

In a previous post, “Toggling a Flex container’s visibility”, we looked at toggling a VBox container’s visibility by setting both the visible property and includeInLayout property. While the approach felt a little crude, we can build the same thing using the much more powerful view states. What are view states and how do we use them? Well, if you’re new to states, this should clear everything up: “Adobe - Flex Quick Start Basics: Creating States”.

Now, with that out of the way, lets look at some code and a basic example.

Full code after the jump.

Continue reading ‘Toggling a Flex container’s visibility using states’

23
Aug

Toggling a Flex container’s visibility

The following example shows a pretty crude method for toggling a container’s visibility and removing it from the Flex application layout. Mind you, this probably isn’t the preferred/recommended method of doing this (I imagine using states would be a lot nicer/cleaner) but hey, I’ll have to save that method up for another entry.

Full code after the jump.

Continue reading ‘Toggling a Flex container’s visibility’