0 Replies Latest reply on May 25, 2007 8:49 PM by One Triple Zero

    HSlider Resizing Problem

    One Triple Zero
      I've got an issue with HSlider bars in Flex resizing themselves despite having their widths set in the MXML. It seems that the track will begin to shrink if I have labels that are more than 2 characters long, and it will get shorter as the labels get longer. Here's the code:

      <mx:Style>
      HSlider {
      labelOffset:3;
      thumbOffset:3;
      dataTipPlacement:left;
      tickThickness:1;
      showTrackHighlight:true;
      }
      </mx:Style>

      <mx:HSlider id="organics" width="250" left="250" top="100"
      minimum="0"
      maximum="8"
      labels="['0','2','4','6','8']" />

      <mx:HSlider id="gravel" width="250" left="250" top="135"
      minimum="0"
      maximum="50"
      labels="['0','10','20','30','40','50']" />

      <mx:HSlider id="compaction" width="250" left="250" top="170"
      minimum="0.9"
      maximum="1.3"
      labels="['loose','normal','dense','hard','severe']" />

      The first two sliders output fine, the third, however, is shorter than the others by a quite noticeable margin. I found that making the label strings longer will actually cause the track to shrink even more, to the point that the labels are unreadable due to overlap. Is anyone else experiencing this? Does anyone have a solution or is it staring me in the face?

      Any help is appreciated.