Methods | Properties | Effects | Events | Styles | Examples Frames | No Frames

mx.controls
Class VScrollBar

Inheritance ImageInheritance ImageInheritance Image


class VScrollBar
extends mx.controls.scrollClasses.ScrollBar

The VScrollBar (vertical ScrollBar) control lets you control the portion of data that is displayed when there is too much data to fit in the display area. This control wraps the base ScrollBar control.

Although you can use the VScrollBar control as stand-alone control, you usually combined it with other components as part of a new component to provide scrolling functionality.

ScrollBar controls include four parts: two arrow buttons, a track, and a thumb. The position of the thumb and display of the buttons depend on the current state of the ScrollBar control. The ScrollBar control uses four parameters to calculate its display state:

MXML Syntax

The <mx:VScrollBar> tag inherits all the properties of its parent classes, and the following properties:

 <mx:VScrollBar
lineScrollSize="1"
pageScrollSize="No default."
repeatDelay="500"
repeatInterval="35"
scrollPosition="0"
scroll="Event handler; no default."
/>

Click here to view the Examples

See Also
    scrollClasses.ScrollBar



Methods

Methods inherited from class mx.controls.scrollClasses.ScrollBar
setScrollProperties  

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

Methods inherited from class mx.core.UIObject
addEventListener   applyProperties   buildDepthTable   commitProperties   constructObject2   createAccessibilityImplementation   createChildAtDepth   createChildren   createClassChildAtDepth   createClassObject   createEmptyObject   destroyObject   dispatchEvent   doLater   draw   drawRect   executeBindings   fillRect   findNextAvailableDepth   getRepeaterItem   getStyle   handleEvent   init   invalidate   invalidateLayout   invalidateProperties   invalidateSize   invalidateStyle   layoutChildren   measure   move   redraw   removeEventListener   setDepthAbove   setDepthBelow   setMask   setSize   setSizeNoLayout   setStyle   swapDepths  



Properties
       className: String
Name of this class.
staticversion: String
Version string for this class.

Properties inherited from class mx.controls.scrollClasses.ScrollBar
className   lineScrollSize   maxPos   minPos   pageScrollSize   pageSize   scrollPosition  

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

Properties inherited from class mx.core.UIObject
alpha   baselinePosition   className   depth   documentDescriptor   height   heightFlex   id   instanceIndices   isDocument   kStretch   layoutHeight   layoutWidth   maxHeight   maxWidth   minHeight   minWidth   mouseX   mouseY   nestLevel   oldHeight   oldWidth   oldX   oldY   parent   parentApplication   parentDocument   percentHeight   percentWidth   preferredHeight   preferredWidth   repeaterIndices   scaleX   scaleY   styleName   tabEnabled   toolTip   version   visible   width   widthFlex   x   y  



Effects

Effects inherited from class mx.core.UIComponent
focusInEffect   focusOutEffect  

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



Events
scrollHandler for scroll events, which are broadcast when the ScrollBar control state changes. The target property of the event object contains a reference to the component that triggered the event. The type property contains the name of the event, scroll.

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

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



Styles
repeatDelay Type: Number   Format: Time   CSS Inheritance: no
Number of milliseconds to wait after the first buttonDown event before repeating buttonDown events at the value specified by repeatInterval. The default value is 500.
repeatInterval Type: Number   CSS Inheritance: no
Number of milliseconds between buttonDown events if the user presses and holds on a button. The default value is 35.

Styles inherited from class mx.controls.scrollClasses.ScrollBar
trackColors  

Styles inherited from class mx.core.UIComponent
backgroundAlpha   backgroundColor   backgroundDisabledColor   backgroundImage   backgroundSize   barColor   borderCapColor   borderColor   borderSides   borderStyle   borderThickness   cornerRadius   disabledColor   dropShadow   errorColor   fillColors   highlightColor   modalTransparency   scrollTrackColor   selectedFillColors   shadowCapColor   shadowColor   shadowDirection   shadowDistance   symbolBackgroundColor   symbolBackgroundDisabledColor   symbolBackgroundPressedColor   symbolColor   symbolDisabledColor   themeColor  

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



Property Detail

className

className: String  

Name of this class.


version

static  version: String  

Version string for this class.


Examples
VScrollBarExample.mxml
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the VScrollBar control -->
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF">
 
 <mx:Script>
    <![CDATA[
       
           function myScroll(event)
           {
             showPosition.text = "VScrollBar properties summary:" + '\n' +
                                 "------------------------------------" + '\n' +
                                 "A number that represents the current scroll position: " + event.scrollPosition  + '\n' +
                                 "Amount to scroll when an arrow button is pressed: " + event.lineScrollSize + '\n' +
                                 "Amount to move the scroll when the scroll bar track is pressed: " + event.pageScrollSize + '\n' +                                                      
                                 "A number which represents the maximum scroll position: " + event.maxPos + '\n' +
                                 "A number which represents the minimum scroll position: " + event.minPos ;
           }
    ]]>
</mx:Script> 
  
  <mx:Panel id="panel" title="Vertical Scrollbar Panel" hScrollPolicy="off" vScrollPolicy="off" height="85%" width="80%">
     
	 <mx:HBox height="100%" width="100%">
       
	    <mx:VScrollBar id="bar" minPos="0" lineScrollSize="50" pageScrollSize="100" height="100%" maxPos="{panel.height - 20}" 
          scroll="myScroll(event.target);" repeatDelay="1000" repeatInterval="500" />
          
        <mx:Label id="showPosition" text="click on scroll bar to view its properties." color="#0000FF" />
    
	</mx:HBox>   
  
  </mx:Panel>
  
</mx:Application>




 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flex/15/asdocs_en/mx/controls/VScrollBar.html