5 Replies Latest reply on Apr 21, 2010 10:20 AM by SpaghettiCoder

    s:HSlider datatip formatter

    daslicht Level 2

      Hello,

       

      I have found this example in the Flex manual:


                     import mx.formatters.NumberBase;
                     public function myDataTipFormatter(value:Number):Object

              { 
                  var dataFormatter:NumberBase = new NumberBase(".", ",", ".", ""); 
                  return   "$ " + dataFormatter.formatPrecision(String(value), slider.dataTipPrecision); 
              } 
      
      

       

      But, how do I actually use that ?

       

      Background Info:

      Basicly I like to manually overwrite the datatip with my own data.

       

      Let's say I have a Slider with min=0 max=1500 and its stepsize=500 so that it have 3 positions.

      Now I want to display '1' on the first, '2' on the second and '3' on the third position which are calulated based on the slider position and the max value.

       

      Cheers Marc