mx.core
Class ScrollView


Direct Known Subclasses
           mx.controls.TextArea, mx.controls.listclasses.ScrollSelectList

class ScrollView
extends mx.core.View

The ScrollView class is the base class for components with scroll bars and a mask. This component implements the Scroller interface, which is the API that defines any control meant for scrolling Scrollable content. Any content to be scrolled by such a control must implement Scrollable, the complementary interface that communicates with the Scroller interface.

MXML Syntax

The <ScrollView> class has the following properties:

 <mx:tagname
hPosition="0"
hSCrollPolicy="off|on|auto"
maxHPosition="No default.
vPosition="0"
vScrollPolicy="auto|off|on"
/>



Methods
      createChild(classOrSymbol, name:String, props:Object, defer:Boolean) : MovieClip
Adds a new child object.
      getViewMetrics() : Object
Gets the thickness of the edges of the object, including the border and scroll bars, if visible.
      setScrollProperties(colCount:Number, colWidth:Number, rwCount:Number, rwHeight:Number, hPadding:Number, wPadding:Number) : Void
Sets the parameters for scrolling

Methods inherited from class mx.core.View
init  draw  createChild  getChildAt  getChildIndex  setChildIndex  destroyAllChildren  destroyChild  destroyChildAt  getViewMetrics 

Methods inherited from class mx.core.UIComponent
getFocus  setFocus  getFocusManager 

Methods inherited from class mx.core.UIObject
createAccessibilityImplementation  measure  doLater  cancelAllDoLaters  invalidate  invalidateStyle  invalidateProperties  invalidateSize  redraw  move  setSize  setSizeNoLayout  drawRect  fillRect  destroyLabel  createClassObject  createEmptyObject  destroyObject  getStyle  setMask  swapDepths 


Properties
staticversion:String  
ComponentVersion is for internal use only.
      className:String  
Name of this class.
      hScrollPolicy:String   [Read-Write]
Whether the horizontal scroll bar is always on, always off, or automatically changes.
      vScrollPolicy:String   [Read-Write]
Whether the vertical scroll bar is always on, always off, or automatically changes.
      hPosition:Number   [Read-Write]
Offset into the content from the left edge.
      vPosition:Number   [Read-Write]
Offset into the content from the top edge.
      maxVPosition:Number   [Read-Only]
Maximum offset into the content from the top edge.
      maxHPosition:Number   [Read-Write]
Maximum offset into the content from the left edge.

Properties inherited from class mx.core.View
version  className  numChildren 

Properties inherited from class mx.core.UIComponent
version  enabled  tabIndex 

Properties inherited from class mx.core.UIObject
version  nestLevel  dispatchEvent  addEventListener  handleEvent  removeEventListener  kStretch  styleName  className  setStyle  parentApplication  isDocument  parentDocument  documentDescriptor  descriptor  instanceIndices  repeaterIndices  getRepeaterItem  id  width  height  x  y  minHeight  minWidth  preferredHeight  preferredWidth  maxHeight  maxWidth  widthFlex  heightFlex  visible  scaleX  scaleY  alpha  depth  mouseX  mouseY  toolTip  baselinePosition 


Effects

Effects inherited from class mx.core.UIComponent
showEffect  hideEffect  focusInEffect  focusOutEffect 

Effects inherited from class mx.core.UIObject
creationCompleteEffect  moveEffect  resizeEffect  mouseDownEffect  mouseOverEffect  mouseOutEffect  mouseUpEffect 


Events
scrollBroadcast when the content is scrolled. The event object contains the following properties:
- direction Either vertical or horizontal. - position Original position. - delta Change in position. Target contains a reference to the component that triggered the event. Type contains the name of the event.

Events inherited from class: mx.core.View
childCreated  childIndexChanged  childDestroyed 

Events inherited from class: mx.core.UIComponent
focusIn  focusOut  keyDown  keyUp  show  hide  valid  invalid  valueCommitted 

Events inherited from class: mx.core.UIObject
initialize  creationComplete  resize  move  draw  load  unload  mouseDown  mouseUp  mouseMove  mouseOver  mouseOut  mouseDownSomewhere  mouseUpSomewhere  mouseMoveSomewhere  mouseChangeSomewhere  effectStart  effectEnd  dragBegin  dragComplete  dragEnter  dragOver  dragExit  dragDrop 


Styles

Styles inherited from class mx.core.UIComponent
backgroundColor  backgroundDisabledColor  backgroundImage  backgroundAlpha  backgroundSize  barColor  borderCapColor  borderColor  buttonColor  borderStyle  disabledColor  errorColor  highlightColor  lineHeight  modalTransparency  scrollTrackColor  shadowColor  shadowCapColor  symbolColor  symbolBackgroundColor  symbolBackgroundDisabledColor  symbolBackgroundPressedColor  symbolDisabledColor  themeColor 

Styles inherited from class mx.core.UIObject
color  fontFamily  fontSize  fontStyle  fontWeight  textAlign  textDecoration  textIndent  marginLeft  marginRight  horizontalGap  verticalGap 


Method Detail

createChild

createChild(classOrSymbol, name:String, props:Object, defer:Boolean) : MovieClip

Adds a new child object.
Note: Only one child is allowed in a the ScrollView class.

Parameters
     classOrSymbol - Reference to a class, the linkage ID of a symbol, or file path or URL to the external content. Note: Specify the class name without using double quotation marks; do not specify the component as a String.
     name - Instance name of the child.
     props - Object that contains initialization properties.
     defer - Whether to defer instantiation.

See Also
     mx.core.View


getViewMetrics

getViewMetrics() : Object

Gets the thickness of the edges of the object, including the border and scroll bars, if visible.

Returns
     Object with the left, right, top and bottom edges' thickness, in pixels.


setScrollProperties

setScrollProperties(colCount:Number, colWidth:Number, rwCount:Number, rwHeight:Number, hPadding:Number, wPadding:Number) : Void

Sets the parameters for scrolling

Parameters
     colCount - Number of units to scroll horizontally.
     colWidth - Width in pixels of each of those units.
     rwCount - Number of units to scroll vertically.
     rwHeight - Height in pixels of each of those units.
     hPadding - Pixels on the left edge that are not scrolled (for row headers).
     wPadding -


Property Detail

className

className:String  

Name of this class.


hPosition

hPosition:Number   [Read-Write]

Offset into the content from the left edge.


hScrollPolicy

hScrollPolicy:String   [Read-Write]

Whether the horizontal scroll bar is always on, always off, or automatically changes.


maxHPosition

maxHPosition:Number   [Read-Write]

Maximum offset into the content from the left edge.


maxVPosition

maxVPosition:Number   [Read-Only]

Maximum offset into the content from the top edge.


version

static version:String  

ComponentVersion is for internal use only.


vPosition

vPosition:Number   [Read-Write]

Offset into the content from the top edge.


vScrollPolicy

vScrollPolicy:String   [Read-Write]

Whether the vertical scroll bar is always on, always off, or automatically changes.