Flex 4 - 滚动条皮肤

发布于 2024-10-10 13:09:14 字数 510 浏览 3 评论 0原文

我正在尝试在应用程序中设置 Scroller 的外观,使其看起来像 http://insideria.com/2009/11/flex-101-customize-scrollbars.html

此示例是在 Flex 3 中完成的,图像是在 CSS 中设置的。

我尝试为组件 Scroller 创建外观,发现它使用 VScrollBarHScrollBar。我尝试为这些组件放置皮肤。 VScrollBar 对轨道、拇指、递减/递增按钮使用单独的外观。

我尝试对皮肤进行一些更改,但它们根本没有反映在应用程序中。

有人可以告诉我我的方向是否正确吗?

我只想在 Flex 4 中使用自定义拇指创建自定义滚动条。如果您能给我这方面的建议,我将不胜感激。

I'm trying to skin the Scroller in my application so that it looks like the example mentioned in http://insideria.com/2009/11/flex-101-customize-scrollbars.html

This example was done in Flex 3 and images are set in CSS.

I tried to create a skin for the component Scroller and saw that it uses VScrollBar and HScrollBar. I tried to put skins for these components. VScrollBar uses separate skins for the track, thumb, decrement/increment buttons.

I tried to make some changes in the skin, but they were not reflected at all in the application.

Can some one kindly tell me if I'm heading in the right direction?

I just want to create a customized scroll bar in Flex 4 with custom thumbs. Would appreciate if you could give me suggestions on this.

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

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

发布评论

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

评论(2

-小熊_ 2024-10-17 13:09:14

为以下项创建外观文件:VScrollBarSkin、VScrollBarThumbSkin、VScrollBarTrackSkin、HScrollBarSkin、HScrollBarThumbSkin 和 HScrollBarTrackSkin。 (我通常使用默认外观作为起点。)确保 VScrollBarSkin 和 HScrollBarSkin 文件引用您的新轨道/拇指外观。然后在 CSS 中设置它们,如下所示:

s|HScrollBar {
    skinClass: ClassReference("my.path.to.skins.HScrollBarSkin");
}

s|VScrollBar {
    skinClass: ClassReference("my.path.to.skins.VScrollBarSkin");
}

希望有帮助。

Create skin files for the following: VScrollBarSkin, VScrollBarThumbSkin, VScrollBarTrackSkin, HScrollBarSkin, HScrollBarThumbSkin and HScrollBarTrackSkin. (I generally use the default skins as a starting point.) Make sure the VScrollBarSkin and HScrollBarSkin files refer to your new track/thumb skins. Then set them in your CSS like so:

s|HScrollBar {
    skinClass: ClassReference("my.path.to.skins.HScrollBarSkin");
}

s|VScrollBar {
    skinClass: ClassReference("my.path.to.skins.VScrollBarSkin");
}

Hope that helps.

夜雨飘雪 2024-10-17 13:09:14

听起来你的方向是正确的,也许首先尝试一下这里发布的示例,我还没有给出这个例子,但它看起来是一个很好的例子:http://dgrigg.com/blog/2010/07/06 /flex-spark-list-with-custom-scroll-bar-and-itemrenderer/

It sounds like you're going the right direction perhaps try what's posted here as an example first, I haven't given this a run-through yet but it looks like a good example: http://dgrigg.com/blog/2010/07/06/flex-spark-list-with-custom-scroll-bar-and-itemrenderer/

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