일반적으로 스크롤러의 높이/너비를 명시 적 값으로하고 어린이의 높이/너비를 백분율로 만들려고합니다. 당신은 그 반대로했습니다. 그래서,이 같은 : 그러나
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fx="http://ns.adobe.com/mxml/2009">
<s:Scroller width="100%" height="1400" verticalScrollPolicy="on">
<s:Group height="100%"/>
</s:Scroller>
</s:Application>
, 그 스크롤러/그룹에 사용 가능한 윈도우의 폭을 만드는 문제가 해결되지 않습니다. updateDisplayList() 메서드의 요소 크기를 조정하면됩니다.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:s="library://ns.adobe.com/flex/spark" xmlns:fx="http://ns.adobe.com/mxml/2009">
<fx:Script>
protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number:void{
super.updateDisplayList(unscaledWidth, unscaledHeight);
myScroller.width = unscaledWidth;
myScroller.height - unscaledHeight;
mySCrollingGroup.width = unscaledWidth
mySCrollingGroup.height - unscaledHeight;
}
</fx:Script>
<s:Scroller verticalScrollPolicy="on" id="myScoller">
<s:Group id="mySCrollingGroup" />
</s:Scroller>
</s:Application>
스크롤 막대의 높이/너비에 맞게 myScrollingGroup의 크기를 조정할 수 있습니다. 또는 myScrollingGroup에서 precentHeight/percentWidth 속성을 사용하고 100 %로 설정할 수 있습니다.
감사합니다. updatedDisplayList 함수에서 myScroller.percentHeight를 설정할 때 부드럽게 작동했습니다! –