Flex Spark 应用程序容器禁用滚动条

发布于 2024-10-04 14:14:18 字数 350 浏览 1 评论 0原文

第一个问题,我是否必须有一个应用程序容器作为我的 mxml 文件中的根节点?其次,我在 adobe 网站上阅读文档,它说Spark 应用程序容器默认没有滚动条,可以通过使用自定义皮肤来添加滚动条。 (查看比较 mx 和 Spark 应用程序容器的表格)。但我的问题是我的应用程序容器默认已经有滚动条,我想摆脱它们。我有一个主应用程序容器,其中包含一个已经有滚动条的自定义子组件。我只希望孩子有滚动条而不是主应用程序。现在我得到了 2 个相互嵌套的滚动条。

First question, do I have to necessarily have a application container as the root node in my mxml file? Second, I was reading this document on adobe's website and it says that the spark application container has no scroll bars by default and they can be added by using a custom skin. (Look at the table comparing the mx and spark application containers). But my problem is that my application container already has scroll bars by default and I want to get rid of them. I have a main application container with a custom child component that already has scroll bars. I just want the child to have the scroll bars and not the main application. Right now I get 2 scroll bars nested within each other.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

瑕疵 2024-10-11 14:14:18

是的,我已经解决了这个问题。我在 flex4 应用程序组件的外部采用了一个 MX 组件(“Canvas”),并在应用程序标签处找到了启用的滚动条。

Yes I have resolved this problem. I have taken one MX component("Canvas") at outer of flex4 Application component and find out scroll bar enable at application label.

初见 2024-10-11 14:14:18

我意识到问题是由控制栏中的水平滑块引起的。如果我从控制栏中删除滑块,容器将按预期工作,这意味着没有滚动条。要解决滚动条中有滑块的问题,只需将其放入水平盒/垂直盒内即可。 (这并不重要,因为滑块是我放入其中的唯一内容),然后禁用封闭框中的水平和垂直滚动条策略。将滑块封装在盒子容器中神奇地解决了这个问题。

I realized that the problem was being caused by having a horizontal slider in my control bar. If I remove the slider from the control bar the container works as expected that means no scroll bars. To solve the problem with having a slider in the scroll bar just put it inside a Hbox / Vbox. (doesn't matter as slider is the only content I put in there) and then disable the horizontal and vertical scroll bar policy on the enclosing box. Enclosing the slider in a box container magically solves the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文