3

I am working with Flex 4.6 AIR application. I have used mx slider but there is a problem in alignment. The slider should alignment and start below the 0 min. and end 60 min but slider is starting middle of the 0 min. and end middle of the 60 min lable.

The code is below.

<mx:HSlider id="timeSlider" width="168" change="timeSlider_changeHandler(event)"
                        dataTipFormatFunction="timeDataTipFunction" dataTipPrecision="0"
                        labelOffset="2" labels="[0 min.,60 min.]" liveDragging="false" maximum="60"
                        minimum="0" showTrackHighlight="true" snapInterval="1" styleName="hslider"
                        value="{uservo.showtime}"/>

The screen shot is below

enter image description here

  • 1
    I'm not sure I understand your question. When you say "alignment" do you mean the position of the slider thumb? Or are you really referring to how this component is aligned with other sibling objects? You might include a screen shot. I think you might need a few more reputation points to include an image attachment, so here is an up vote! – Sunil D. Sep 02 '13 at 17:17
  • Have you checked http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7d95.html ? – Alexander Farber Sep 03 '13 at 08:27
  • HI, Sunil D Thanks for adding reputation point. I have uploaded the image now you can clearly understand my problem. i want slider should start below the 0 and end in last below 60 min. – BikrantSingh Sep 04 '13 at 10:59
  • So to further clarify: the labels "0 min" and "60 min" are centered over the start/end points of the slider track (the horizontal bar). But you would like the slider bar to be a little longer so it goes to the begin/end of the labels? This might be easier to do with a Spark slider (``) than with the MX version, because it's so much easier to modify Spark skins. – Sunil D. Sep 04 '13 at 14:19
  • If I increase the width of this horizontal bar, The problem remains same. I want to achieve this using mx. Could you please arrange a code for it, This will be useful for me. – BikrantSingh Sep 05 '13 at 09:21

1 Answers1

1

enter image description here

If you want to get this effect set the following property to 0

trackMargin="0"
Anton
  • 4,544
  • 2
  • 25
  • 31