メソッド | プロパティ | エフェクト | イベント | スタイル | フレームあり | フレームなし

mx.controls
HScrollBar クラス

継承を示す線継承を示す線継承を示す線


HScrollBar クラス
mx.controls.scrollClasses.ScrollBar の拡張

HScrollBar (水平 ScrollBar) コントロールを使用すると、データが多すぎて表示領域に収まらない場合に、表示される部分のデータを制御できます。このコントロールは、基本の ScrollBar コントロールをラップしたものです。HScrollBar コントロールは、基本の ScrollBar コントロールを 90 度回転します。

HScrollBar コントロールは単独のコントロールとしても使用できますが、通常は他のコンポーネントと組み合わせ、スクロール機能を持つ別のコンポーネントの一部として使用します。

ScrollBar コントロールは、2 つの矢印ボタン、1 つのトラック、および 1 つのサムの 4 つの部分から構成されます。サムの位置とボタンの表示は、ScrollBar コントロールの現在の状態に依存します。ScrollBar コントロールでは、表示状態を計算するために次の 4 つのパラメータが使用されます。

MXML シンタックス

<mx:HScrollBar> タグは、HScrollBar コントロールを定義するために使用します。<mx:DataGridColumn> タグには、次のプロパティを使用できます。

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

を参照するにはここをクリックしてください

関連項目
    scrollClasses.ScrollBar



メソッド

mx.controls.scrollClasses.ScrollBar クラスから継承されるメソッド
setScrollProperties  

mx.core.UIComponent クラスから継承されるメソッド
drawFocus   getFocus   getFocusManager   setEnabled   setFocus  

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  



プロパティ

mx.controls.scrollClasses.ScrollBar クラスから継承されるプロパティ
className   lineScrollSize   maxPos   minPos   pageScrollSize   pageSize   scrollPosition  

mx.core.UIComponent クラスから継承されるプロパティ
enabled   errorString   tabEnabled   tabIndex   version  

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  



エフェクト

mx.core.UIComponent クラスから継承されるエフェクト
focusInEffect   focusOutEffect  

mx.core.UIObject クラスから継承されるエフェクト
creationCompleteEffect   hideEffect   mouseDownEffect   mouseOutEffect   mouseOverEffect   mouseUpEffect   moveEffect   resizeEffect   showEffect  



イベント
scrollスクロールイベントのハンドラです。スクロールイベントは、ScrollBar コントロールの状態が変化したときにブロードキャストされます。このイベントオブジェクトの target プロパティには、イベントをトリガしたコンポーネントへの参照が含まれます。type プロパティには、イベントの名前である scroll が含まれます。

mx.core.UIComponent クラスから継承されるイベント
focusIn  focusOut  invalid  keyDown  keyUp  valid  valueCommitted 

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 



スタイル
repeatDelay 型 : Number   形式 : Time   CSS の継承 : なし
最初の buttonDown イベントが発生してから、repeatInterval の間隔で buttonDown イベントが繰り返し発生し始めるまでの時間 (ミリ秒) です。デフォルト値は 500 です。
repeatInterval 型 : Number   CSS の継承 : なし
ユーザーがボタンを押し続けた場合に、buttonDown イベントを繰り返す間隔 (ミリ秒) です。デフォルト値は 35 です。

mx.controls.scrollClasses.ScrollBar クラスから継承されるスタイル
trackColors  

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  

mx.core.UIObject クラスから継承されるスタイル
color   fontFamily   fontSize   fontStyle   fontWeight   horizontalGap   leading   marginLeft   marginRight   textAlign   textDecoration   textIndent   verticalGap  



プロパティの詳細

HScrollBarExample.mxml
<?xml version="1.0" encoding="utf-8"?>
<!-- HScrollBar コントロールの使用方法を示す簡単な例 -->
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF">
 
<mx:Script>
<![CDATA[
       
function myScroll(event)
           {
showPosition.text = "HScrollBar 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="Horizontal Scrollbar Panel" hScrollPolicy="off" vScrollPolicy="off" height="60%" width="80%">
        
<mx:HScrollBar id="bar" minPos="0" lineScrollSize="50" pageScrollSize="100" width="100%" maxPos="{panel.width - 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:Panel>
  
</mx:Application>