Flex 4 - 滚动条皮肤
我正在尝试在应用程序中设置 Scroller 的外观,使其看起来像 http://insideria.com/2009/11/flex-101-customize-scrollbars.html
此示例是在 Flex 3 中完成的,图像是在 CSS 中设置的。
我尝试为组件 Scroller 创建外观,发现它使用 VScrollBar 和 HScrollBar。我尝试为这些组件放置皮肤。 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为以下项创建外观文件:VScrollBarSkin、VScrollBarThumbSkin、VScrollBarTrackSkin、HScrollBarSkin、HScrollBarThumbSkin 和 HScrollBarTrackSkin。 (我通常使用默认外观作为起点。)确保 VScrollBarSkin 和 HScrollBarSkin 文件引用您的新轨道/拇指外观。然后在 CSS 中设置它们,如下所示:
希望有帮助。
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:
Hope that helps.
听起来你的方向是正确的,也许首先尝试一下这里发布的示例,我还没有给出这个例子,但它看起来是一个很好的例子: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/