Tag Archives: horizontalAlign

Creating a variable row height Spark DropDownList control in Flex 4

In a previous example, “Creating a variable row height item renderer on a ComboBox control in Flex”, we saw how you could create a variable row height item renderer on a Flex MX ComboBox control by setting the variableRowHeight property on the ComboBox control’s dropdown property.

The following example shows how you can create a variable row height Spark DropDownList control in Flex 4 by setting a custom VerticalLayout object and setting the Boolean variableRowHeight property and the horizontalAlign property.

Full code after the jump.

Continue reading Creating a variable row height Spark DropDownList control in Flex 4

Setting word wrapping on a Spark List control in Flex 4

The following example shows how you can enable word wrapping on a Spark List control in Flex 4 by overriding the default layout with a VerticalLayout object and set its horizontalAlign property to “justify” (instead of the default “contentJustify”).

Full code after the jump.

Continue reading Setting word wrapping on a Spark List control in Flex 4

Setting the horizontal alignment on a Spark List control in Flex 4

The following example shows how you can set the horizontal alignment on a Spark List control in Flex 4 with a vertical layout by setting the horizontalAlign property on the VerticalLayout object to one of the static constants in the mx.layout.HorizontalAlign class.

Continue reading Setting the horizontal alignment on a Spark List control in Flex 4