在 Flex 4 中对 Spark HSlider 进行蒙皮
我正在开发的应用程序需要有一个滑块以允许用户选择日期。但是,Spark hSlider 组件没有像 halo hSlider 那样的“标签”字段 - 您可以在其中放置要沿着滑块轨道显示的标签集合,以表示可以从滑块中选择的值。
我读过,您必须对 hSlider 轨道进行皮肤处理才能在 Flex 4 中显示标签 - 有人对如何完成此操作有任何指导吗?
The application I'm working on needs to have a slider to allow the user to select a Date. However, the Spark hSlider component does not have a 'labels' field like the halo hSlider does - into which you could put a collection of labels to be displayed along the track of the slider to denote the values selectable from the slider.
I have read that you have to skin the hSlider's track in order to display labels in Flex 4 - does anyone have any guidence as to how this is done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过创建您自己的以下皮肤版本来使您的 HSlider 看起来像您喜欢的那样:HSliderSkin、HSliderTrackSkin、HSliderThumbSkin。将这些文件的默认版本复制到您的项目中,并根据需要进行修改。然后将 HSlider 的 SkinClass 属性设置为您的自定义 HSliderSkin。希望有帮助。
You can make your HSlider look however you like by creating your own versions of the following skins: HSliderSkin, HSliderTrackSkin, HSliderThumbSkin. Copy the default versions of these files into your project and modify them however you like. Then set the skinClass property of your HSlider to be your custom HSliderSkin. Hope that helps.