简体   繁体   English

在 Flex 中为 as:Panel 创建滚动条

[英]Creating a scrollbar for a s:Panel in Flex

I am new to flex development.我是弹性开发的新手。

In my proj, I have created a panel using this在我的项目中,我使用它创建了一个面板

<s:Panel x="46" y="193" width="75%" height="75%" dropShadowVisible="false">

what happens here is that, the part of the panel goes out of the browser view and I need to include scrollbars so that I can scroll to the right end and bottom end of the panel itself.这里发生的是,面板的一部分超出了浏览器视图,我需要包含滚动条,以便我可以滚动到面板本身的右端和底端。

I would like to know how I can add scrollbars to the s:panel.我想知道如何将滚动条添加到 s:panel。

wrap it with a scroller;用卷轴包裹它; ;) ;)

<s:Scroller>
...your content to scroll...
</s:Scroller>

In order to use your own scrollbars you need three things: 1. Your main (parent) container should implement IViewport (any subclasses of s:Group would do) 2. Set container's property 'clipAndEnableScrolling' to 'true'.为了使用您自己的滚动条,您需要三件事: 1. 您的主(父)容器应该实现 IViewport(s:Group 的任何子类都可以) 2. 将容器的属性“clipAndEnableScrolling”设置为“真”。 3. You assign this main container as 'viewport' property of your scrollbar. 3. 将此主容器指定为滚动条的“视口”属性。

HTH, FTQuest HTH, FTQuest

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

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