2011-09-01 3 views
0

모바일 용 Adobe FLEX 4.5.1을 사용하고 있습니다.목록의 스크롤 막대를 보이지 않게 만들기

<s:List id="imageList" initialize="init()" verticalScrollPolicy="off"  itemRenderer="skins.CustomIconItemRenderer" width="100" height="32" verticalCenter="0" horizontalCenter="0"> 
    <s:layout> 
     <s:HorizontalLayout> 
     </s:HorizontalLayout> 
    </s:layout> 
</s:List> 


내가 가로 스크롤 막대가 표시되지 만들하지만 여전히 스크롤 할 수 있도록하려면 :

나는 일부 이미지를 표시하는 목록이 있습니다.

나는 액션이 ​​시도 :

imageList.scroller.horizontalScrollBar.visible=false; 
imageList.scroller.horizontalScrollBar.alpha=0; 
imageList.horizontalScrollPolicy= ScrollPolicy.OFF; 

을 행운으로.

+2

눈에 보이는 부분에 사용자 정의 스크롤 막대 스킨을 만들기; 그런 다음 새 스크롤 막대 스킨을 사용하는 사용자 지정 목록 스킨을 만듭니다. – JeffryHouser

+0

안녕하세요 flextras, 다음과 같은 의미입니까? http://flexponential.com/2009/10/09/changing-the-position-of-the-scroll-bars-in-a-spark-list/? (분명히 스크롤 막대를 제거하고 이동하지 않을 것입니다.) 모바일 버전의 Scroller가 동일한 구성 요소를 가지지 않았거나 (적어도 눈에 띄지는 않기 때문에) 모바일에 특별히 적용되는지 궁금합니다. 감사. – Alex

+0

모바일 스크롤바는 일반 스크롤 막대 구성 요소와 동일합니다. 그것 jus에는 다른 피부가있다. 간략한 검토를 바탕으로; 그 블로그 게시물의 개념이 적용되는 것처럼 보입니다. 모바일 스킨을 만드는 것은 일반적으로 ActionScript에서 수행되지만, MXML이 아닙니다. – JeffryHouser

답변

0

<fx:Metadata> 
<![CDATA[ 
    /** 
    * @copy spark.skins.spark.ApplicationSkin#hostComponent 
    */ 
    [HostComponent("spark.components.Scroller")] 
]]> 
</fx:Metadata> 

<fx:Script> 
<![CDATA[  
    /** 
    * @private 
    */ 
    override public function beginHighlightBitmapCapture() : Boolean 
    { 
     var needUpdate:Boolean = super.beginHighlightBitmapCapture(); 

     // Draw an opaque rect that fill our entire skin. Our background 
     // is transparent, but we don't want focus/error skins to 
     // poke through. This is safe to do since we don't have any 
     // graphic elements as direct children. 
     graphics.beginFill(0); 
     graphics.drawRect(0, 0, width, height); 
     graphics.endFill(); 

     return needUpdate; 
    } 

    /** 
    * @private 
    */ 
    override public function endHighlightBitmapCapture() : Boolean 
    { 
     var needUpdate:Boolean = super.endHighlightBitmapCapture(); 

     // Clear the rect we drew in beginBitmapCapture(); 
     graphics.clear(); 

     return needUpdate; 
    } 
]]> 
</fx:Script> 

<!--- A vertical scrollbar that lets you control the portion of data that is displayed 
     when there is too much data to fit vertically in a display area. 
     The Scroller determines whether the vertical ScrollBar is visible. --> 
<!--<s:VScrollBar id="verticalScrollBar" visible="false" />--> 

<!--- A horizontal scrollbar that lets you control the portion of data that is displayed 
     when there is too much data to fit horizontally in a display area. 
     The Scroller determines whether the horizontal ScrollBar is visible. --> 
<!--<s:HScrollBar id="horizontalScrollBar" visible="false" />--> 

관련 문제