我在嘗試通過視口向上或向下滾動滾動條中的內容時遇到問題。Flex Spark view-port滾動問題?
我MXML鱈魚是
<s:BorderContainer width="100%" cornerRadius="3" backgroundColor="#999AAA"
borderAlpha="0" borderColor="#999AAA" backgroundAlpha="0">
<s:layout>
<s:VerticalLayout paddingTop="0" horizontalAlign="left" />
</s:layout>
<s:Scroller id="id_Scroller" width="100%" height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off" >
<s:Group width="100%" height="100%" >
<s:layout>
<s:VerticalLayout paddingTop="2" horizontalAlign="center" gap="1" clipAndEnableScrolling="true"/>
</s:layout>
<vitals:VBVitalsGridPanel id="id_VBVitalsGridPanel" width="100%" ExpandedView="true" allowSlideOut="true"
QSSlideStateChange="slideoutManager.QSAutoSlideChangeHandler(event)"
QSViewStateChange="slideoutManager.QSAutoCollapseHandler(event)"
/>
<cc:VBCCHPIGridPanle width="100%" ExpandedView="false" id="id_hpi" allowSlideOut="true"
QSSlideStateChange="slideoutManager.QSAutoSlideChangeHandler(event)"
QSViewStateChange="slideoutManager.QSAutoCollapseHandler(event)"
/>
<ros:VBROSGridPanel width="100%" ExpandedView="false" id="id_ros" allowSlideOut="true"
QSSlideStateChange="slideoutManager.QSAutoSlideChangeHandler(event)"
QSViewStateChange="slideoutManager.QSAutoCollapseHandler(event)"
/>
<physical:VBPhysicalGridView width="100%" ExpandedView="false" id="id_physical" allowSlideOut="true"
QSSlideStateChange="slideoutManager.QSAutoSlideChangeHandler(event)"
QSViewStateChange="slideoutManager.QSAutoCollapseHandler(event)"
/>
<lab:VBLabViewPanel width="100%" ExpandedView="false" id="id_lab" allowSlideOut="true"
QSSlideStateChange="slideoutManager.QSAutoSlideChangeHandler(event)"
QSViewStateChange="slideoutManager.QSAutoCollapseHandler(event)"
/>
</s:Group>
</s:Scroller>
</s:BorderContainer>
和我的滾動功能在這裏,
public function ScrollUp():void
{
id_Scroller.viewport.verticalScrollPosition += 15;
trace(' -->> '+ id_Scroller.viewport.verticalScrollPosition)
}
public function ScrollDown():void
{
id_Scroller.viewport.verticalScrollPosition -= 15;
}
我總是拿到15時,我向上滾動。
爲什麼?
請幫助我THNAKS
外貌走對我來說,除了滾動功能 - 當你評論它們時它工作嗎? – SQLiteNoob