简体   繁体   中英

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

I am new to 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". How to implement it in containers like Group,Panel and etc?

Thanks

The answer differs between flex 4 (spark) components and flex 3 (halo) container components. 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. 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. Hope that helps.

The Application tag also has horizontalScrollPolicy and verticalScrollPolicy properties.

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

In the Spark architecture, you want to look at the Scroller class. This is a good tutorial:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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