Flex Spark view-port Scrolling issue?
I face a problem while i am try to scroll up or down the content in a scroller via viewport.
my MXML cod is
<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>
and my function for scrolling is here,
public functi开发者_Go百科on ScrollUp():void
{
id_Scroller.viewport.verticalScrollPosition += 15;
trace(' -->> '+ id_Scroller.viewport.verticalScrollPosition)
}
public function ScrollDown():void
{
id_Scroller.viewport.verticalScrollPosition -= 15;
}
I am always got 15 when i scroll Up.
Why?
Pls help me THNAKS
Try removing the height & width from the group
<s:Group width="100%" height="100%" >
//-->
<s:Group>
Also you need
<s:Group clipAndEnableScrolling="true" >
Try doing this instead:
scroller.verticalScrollBar.value += 15;
精彩评论