简体   繁体   English

如何在Flex的主应用程序/ Windows中添加Scroller?

[英]How to add Scroller in Main application/Windows of Flex?

I am new to Flex. 我是Flex新手。 I am trying to add a scroller in my main application/windows. 我试图在我的主应用程序/窗口中添加一个滚动条。 Is that possible? 那可能吗? I found out it is possible to add scoller bars in DataGrid, like horizontalScrollPolicy="on". 我发现可以在DataGrid中添加滚动条,例如horizo​​ntalScrollPolicy =“ on”。 How to implement it in containers like Group,Panel and etc? 如何在Group,Panel等容器中实现它?

Thanks 谢谢

The answer differs between flex 4 (spark) components and flex 3 (halo) container components. flex 4(火花)组件和flex 3(halo)容器组件的答案有所不同。 For spark components such as Groups, you need to wrap your group in a Scroller component to get scrollbars to appear when all of the group's content cannot be viewed. 对于“组”之类的Spark组件,您需要将组包装在Scroller组件中,以便在无法查看组的所有内容时显示滚动条。 Halo container components, such as Canvas, have built in support for scrollbars, meaning they should show up automatically when all of the canvas's content cannot be viewed. Halo容器组件(例如Canvas)内置了对滚动条的支持,这意味着当无法查看所有画布内容时,它们应自动显示。 Hope that helps. 希望能有所帮助。

The Application tag also has horizontalScrollPolicy and verticalScrollPolicy properties. Application标签还具有horizo​​ntalScrollPolicy和verticalScrollPolicy属性。

http://livedocs.adobe.com/flex/3/langref/mx/core/Container.html#horizontalScrollPolicy http://livedocs.adobe.com/flex/3/langref/mx/core/Container.html#verticalScrollPolicy http://livedocs.adobe.com/flex/3/langref/mx/core/Container.html#horizo​​ntalScrollPolicy http://livedocs.adobe.com/flex/3/langref/mx/core/Container.html#verticalScrollPolicy

In the Spark architecture, you want to look at the Scroller class. 在Spark架构中,您要查看Scroller类。 This is a good tutorial: 这是一个很好的教程:

http://www.adobe.com/devnet/flex/articles/flex4_viewport_scrolling.html http://www.adobe.com/devnet/flex/articles/flex4_viewport_scrolling.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM