Tag Archives: verticalScrollPosition

Auto scrolling the contents of a VGroup container in Flex 4

The following example shows how you can tab through a series of Spark TextInput controls in Flex 4 and auto-scroll the VGroup container so that the currently focused text field has focus by using the fractionOfElementInView() method, getScrollPositionDeltaToElement() method, and verticalScrollPosition property.

Full code after the jump.

Continue reading Auto scrolling the contents of a VGroup container in Flex 4

Creating an auto-scrolling DataGrid control in Flex

In a previous example, “Auto-scrolling a TextArea control in Flex”, we saw how you can auto-scroll a Flex TextArea control when new content is added by setting the verticalScrollPosition property to the value of the maxVerticalScrollPosition property.

The following example shows how you can auto-scroll a Flex DataGrid control using the ArrayCollection object’s collectionChange event, and the verticalScrollPosition and maxVerticalScrollPosition properties.

Continue reading Creating an auto-scrolling DataGrid control in Flex