Tag Archives: getElementAt()

Determining the first and last visible item in a scrolling VGroup container in Flex 4

The following example shows how you can determine the first and last item in a Spark VGroup container’s view by using the firstIndexInView and lastIndexInView properties on the VGroup container’s layout property.

Full code after the jump.

Continue reading Determining the first and last visible item in a scrolling VGroup container in Flex 4

Accessing specific buttons in a Spark ButtonBar control in Flex 4

In a suspiciously similar previous example, “Disabling specific buttons in a Spark ButtonBar control in Flex 4”, we saw how you could disable specific buttons in a Spark ButtonBar control in Flex 4 by using a custom skin and setting the skinClass style.

The following example shows you how you can modify specific buttons at runtime using the Flex 4 Spark ButtonBar control’s dataGroup property and getElementAt() method.

Full code after the jump.

Continue reading Accessing specific buttons in a Spark ButtonBar control in Flex 4