1 Reply Latest reply on Sep 3, 2009 2:00 PM by paul.williams

    Hide slider thumb

    Dharmesh Chheda Level 1

      Is there any way in which I can hide the slider thumb . I am using a horizontal slider with 2 thumbs and I need to hide the thumbs in case the slider is disabled.

       

      I tried this

       

      SliderThumb(salesSizeSlider.getThumbAt(0)).visible=false;

      SliderThumb(salesSizeSlider.getThumbAt(1)).visible=false;

       

      but no luck .. I have crude ways to remove the thumb but I dont want to use that approach.. Any inputs?

       

      Thanks

      Dharmesh

        • 1. Re: Hide slider thumb
          paul.williams Level 4

          Setting visibility works fine for me. What problems are you experiencing

          with the approach?

           

          <?xml version="1.0" encoding="utf-8"?>

          <mx:Application

              xmlns:mx="http://www.adobe.com/2006/mxml"

              layout="vertical">

           

              <mx:Script>

                  <![CDATA[

           

                      private function hide() : void

                      {

                          slider.getThumbAt( 0 ).visible = false;

                          slider.getThumbAt( 1 ).visible = false;

                      }

           

                  ]]>

              </mx:Script>

           

              <mx:Button

                  label="hide"

                  click="hide()"/>

           

              <mx:HSlider

                  id="slider"

                  thumbCount="2"

                  minimum="0"

                  maximum="100"

                  values="{ 10, 50 }"/>

           

          </mx:Application