1 Reply Latest reply on Jun 21, 2006 2:24 PM by Newsgroup_User

    HSlider Thumb Size

      I know this question has been asked before, but it hasn't been answered, so sorry for the repeat.

      I would like to be able to increase the size of the thumb on an HSlider in my application because its small size makes it difficult to click (I've seen a few test users struggle with this, so I know I'm not entirely crazy). I'm more or less a newbie, so a clear, step-by-step response would be greatly appreciated, but I understand if you're not willing to take the time to go through that. Thanks so much.
        • 1. Re: HSlider Thumb Size
          Level 7
          If this is for Flex 2.0, then you can create a subclass of SliderThumb and
          use this as your HSlider's sliderThumbClass. Here is a working example:

          sliderTest.mxml:

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="vertical">
          <mx:HSlider sliderThumbClass="MyThumb"/>
          </mx:Application>

          MyThumb.as:

          package
          {
          import mx.controls.sliderClasses.SliderThumb;

          public class MyThumb extends SliderThumb
          {

          override protected function measure():void
          {
          super.measure();

          measuredWidth = 20;
          measuredHeight = 20;
          }
          }
          }


          Change measuredWidth and measuredHeight to the approriate values.

          --
          Jason Szeto
          Adobe Flex SDK Developer


          "marc84" <webforumsuser@macromedia.com> wrote in message
          news:e6pb8i$3cb$1@forums.macromedia.com...
          >I know this question has been
          > http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=346&threadid=
          > 1141551&highlight_key=y&keyword1=thumb#4085259, but it hasn't been
          > answered, so
          > sorry for the repeat.
          >
          > I would like to be able to increase the size of the thumb on an HSlider in
          > my
          > application because its small size makes it difficult to click (I've seen
          > a few
          > test users struggle with this, so I know I'm not entirely crazy). I'm more
          > or
          > less a newbie, so a clear, step-by-step response would be greatly
          > appreciated,
          > but I understand if you're not willing to take the time to go through
          > that.
          > Thanks so much.
          >