Skinning a Spark HSlider in 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开发者_StackOverflow中文版 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?
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.
精彩评论