Thanks for the quick response Jason!  Your advice worked like a charm and so easy I’m a little embarrassed to have even asked the question… 

 

Anyway, as for the use case, I’ll due my best to explain:  Say you want to rank rabbit breeders by the number of rabbits they’ve successfully sold.  Below is a sample table:

 

 

Rabbit breeder rank

Minimum # of rabbits

Maximum # of rabbits

A

751

1000

B

501

750

C

251

500

D

101

250

F

0

100

 

Essentially, we would like to change the above rankings in three ways: 

1)                          Adjust the total scale (ie. 0 – 1000 to 0 – 2000) 

2)                          Adjust the individual ranks (ie. A is 801 – 1000)

3)                          Add or remove new ranks (ie. A+ is 1001 – 2000)

 

We thought a slider to adjust the ranks along with a few editable fields to adjust the total scale and add or remove ranks (slider’s thumbs) would be a fairly intuitive interface…

 

Thanks, Matt

 

PS.  Anyway I can get the source to the slider classes???


From: Jason Szeto [mailto:[EMAIL PROTECTED]
Sent: Monday, March 14, 20054:40 PM
To: [EMAIL PROTECTED]
Subject: RE: [flexcoders] Re: Slider extension

 

Matt,

 

            We purposely limited the Slider to only support 2 thumbs. Can you describe the use case for supporting more than two thumbs?

 

In any case, you can create a subclassof Slider that overrides the set thumbCount setter function. I’ve included an example below. Note that when you override a setter function, you must also override the getter.

 

class MySlider extends mx.controls.HSlider

{

            function MySlider()

            {

            }

           

            function set thumbCount(val:Number)

            {

                        super.thumbCount = val;

                        __thumbCount = val;

            }

           

            function get thumbCount():Number

            {

                        return super.thumbCount;

            }

}

 

 

Jason


From: Matthew Pflueger [mailto:[EMAIL PROTECTED]
Sent: Monday, March 14, 20058:55 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Slider extension

 

Has anybody extended the Slider component to use more than two thumbs?  Also, does anybody have the source to the Flex Slider components?  The FlexForFlash archive under resources does not seem to contain the mx.controls.sliderclasses package…

 

Thanks,

 

Matt

 

 

 



Reply via email to