Set min/max scroll position for ScrollBar : ScrollBar « Components « Flex






Set min/max scroll position for ScrollBar

Set min/max scroll position for ScrollBar
        
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
  
  <mx:Script>
    
      import mx.events.ScrollEvent;
      [Bindable]
      private var scrollPos:Number;
      
      private function scrollHandler(event:ScrollEvent):void
      {
        scrollPos = event.position;
      }
  
  </mx:Script>
  
  <mx:Label id="scrollLabel" fontSize="18" fontWeight="bold" text="Current scroll position: {scrollPos}"/>
  <mx:HScrollBar id="myScrollBar" width="300" minScrollPosition="0" maxScrollPosition="300" pageSize="100" scroll="scrollHandler(event)"/>
  
</mx:Application>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.Create a ScrollBar using and Create a ScrollBar using <mx:VScrollbar> and <mx:HScrollBar>
2.VScrollBar sroll eventVScrollBar sroll event
3.Add the HScrollBar and VScrollBar components to the applicationAdd the HScrollBar and VScrollBar components to the application
4.ScrollBar SimpleScrollBar Simple
5.minScrollPosition,maxScrollPosition,lineScrollSize,pageScrollSize,repeatDelay,repeatIntervalminScrollPosition,maxScrollPosition,lineScrollSize,pageScrollSize,repeatDelay,repeatInterval