Category Archives: Scroller (Spark)

Determining if the scroll bars are visible in a Spark Scroller container in Flex 4

The following example shows how you can determine if the vertical and/or horizontal scroll bars are visible on a Spark Scroller container in Flex 4 by checking the verticalScrollBar or horizontalScrollBar skin part’s Boolean visible property.

Continue reading Determining if the scroll bars are visible in a Spark Scroller container in Flex 4

Setting the slide duration on a Spark HScrollBar control in Flex 4

In a previous example, “Setting the slide duration on a Spark HSlider control in Flex 4”, we saw how you could set the slide duration on a Spark HSlider control in Flex 4 by setting the slideDuration style.

The following example shows how you can set the slide duration on a Spark HScrollBar control in Flex 4 by setting the slideDuration style to control the animated thumb scroll when Ctrl+clicking on the scroll bar track.

Continue reading Setting the slide duration on a Spark HScrollBar control in Flex 4

Programmatically scrolling the Spark TextArea control in Flex 4

The following example shows how you can programmatically scroll the Spark TextArea control in Flex 4 by setting the vertical scroll position on the horizontal and vertical scroll bars in the scroller, horizontalScrollBar, and verticalScrollBar skin parts.

Continue reading Programmatically scrolling the Spark TextArea control in Flex 4

Setting a custom horizontal scroll bar skin on a Spark List control in Flex 4

The following example shows how you can apply a custom horizontal scroll bar skin on the Spark List control in Flex 4 by setting the skinClass style.

Full code after the jump.

Continue reading Setting a custom horizontal scroll bar skin on a Spark List control in Flex 4

Styling the horizontal and vertical scroll bars on a Spark List control in Flex 4

The following example shows how you can set a base theme color on a Spark List control’s horizontal and vertical scroll bar by setting the chromeColor style.

Continue reading Styling the horizontal and vertical scroll bars on a Spark List control in Flex 4

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

Determining how much of an item is visible in a scrolling VGroup container in Flex 4

In a previous example, “Determining the first and last visible item in a scrolling VGroup container in Flex 4”, we saw how you could 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.

The following example shows how you can determine how much of an item is visible in a scrolling VGroup container in Flex 4 by using the fractionOfElementInView() method.

Full code after the jump.

Continue reading Determining how much of an item is visible in a scrolling VGroup container in Flex 4

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