我可以隐藏 Flex 中 s:List 组件中的水平溢出吗?

发布于 2024-10-23 00:42:56 字数 108 浏览 10 评论 0原文

想知道是否有任何方法可以使我的列表不会滚动以显示项目的水平端。很少有项目的长度足够长,需要它,而且水平滚动条会分散注意力。

不过,我没有看到任何属性可以控制它,所以不确定如何实现这一点。

wondering if there's any way to make it so that a list I have will not scroll to show the horizontal end of the items. Very few items go long enough to require it and the horizontal scrollbar is distracting.

I don't see any property to control that, though, so not sure how to achieve this.

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

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

发布评论

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

评论(1

寒江雪… 2024-10-30 00:42:56

List 组件包含一个处理滚动的 Scroller 外观部件。有几种方法可以摆脱水平滚动条,但最简单的可能是在创建完成事件处理程序中设置滚动条上的horizo​​ntalScrollPolicy:

private function onCreationComplete(e:FlexEvent):void {
    myList.scroller.setStyle("horizontalScrollPolicy", "off");
}

希望有帮助。

The List component includes a Scroller skin part that handles scrolling. There are a few ways to get rid of the horizontal scrollbar, but the easiest is probably to set the horizontalScrollPolicy on the scroller in a creation complete event handler:

private function onCreationComplete(e:FlexEvent):void {
    myList.scroller.setStyle("horizontalScrollPolicy", "off");
}

Hope that helps.

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