我创建了一个包含mx:ViewStack的项目,因为它是第一个容器。Flex 4 - s:Scroll
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:comp="mycomp.*"
xmlns:mx="library://ns.adobe.com/flex/mx"
height="100%" width="100%"
minHeight="600" minWidth="800">
<s:layout>
<s:VerticalLayout horizontalAlign="center" />
</s:layout><mx:ViewStack horizontalCenter="0"
verticalCenter="0"
id="contentVs"
height="100%"
width="100%">
<s:NavigatorContent name="biography"
label="Biography"
width="100%"
height="100%">
<comp:Biography />
</s:NavigatorContent>
<s:NavigatorContent name="collections"
label="Collections"
width="100%"
height="100%">
<comp:Collections/>
在各s:NavigatorContent内的mxViewStack我有一个自定义S:SkinnableContainer组件。在这些组件中,我添加了一个s:Scroller作为第一个子容器。
<?xml version="1.0" encoding="utf-8"?>
<s:SkinnableContainer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="100%" height="100%"
creationComplete="this_creationCompleteHandler(event)">
<s:Scroller id="scroller1"
width="100%"
height="100%">
<s:Group>
<s:BorderContainer width="100%" height="100%" borderVisible="true">
请注意,该应用程序的宽度和高度都为100%。
现在,当我减少浏览器的大小滚动不出现。在其中一个s:NavigatorContent(始终在ViewStack内)的情况下,滚动条出现。
我很困惑,为什么它确实出现在一个案例中。如果我将政策设置为, s:Scroller会显示,但即使我的浏览器很小,它也会被禁用。
另外我似乎无法找到一种方法来将这些滚轮着色为黑色。
谢谢。
我想通了最后晚。我必须在某处设置一个静态大小。还有关于滚动条的颜色,我不得不改变皮肤。 – DaTroop 2010-11-25 19:17:01