This is definitely something I’ll keep in mind but I’m currently not having any problems getting the slider to display itself (or its thumbs).  What I’d like to do is be able to set thumbCount=n and give the slider an array[n] of values and have n number of thumbs appear…

 

For example,

 

<mx:HSlider thumbCount="3" minimum="0" maximum="1000" labels="[0,1000]" values="[0,500,1000]" />

 

would display three thumbs, the first at zero, the second at 500, and third at 1000.  Currently, though, the slider ignores the third thumb and displays two, the first at 0 and the second at 500…

 

I wouldn’t mind trying to extendthe Slider myself and hack in this ability but I can’t seem to find the source for Flex’s slider components anywhere…

 

Any ideas????

 

Thanks, Matt

 

 


From: Tracy Spratt [mailto:[EMAIL PROTECTED]
Sent: Monday, March 14, 200512:35 PM
To: [EMAIL PROTECTED]
Subject: RE: [flexcoders] Re: Slider extension

 

Here are some posts that may be relevant:

 

Hi

Let me explain the problem a little more:

Using the code below, the Top Panel with the title "My Title" will not

display the 2 thunbs correctly.

To display the two thumbs correctly, you need to remove the title text

for the panel.

Here is the source youcan try:

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

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">

 

 <mx:Canvas id="TopPanel">

  <mx:Panel title="My Title">

   <mx:ControlBar width="100%">

    <mx:HSlider thumbCount="2" minimum="1" maximum="10"/>

   </mx:ControlBar>

  </mx:Panel>

 </mx:Canvas>

 

 <mx:Canvas id="BottomPanel">

  <mx:Panel >

   <mx:ControlBar width="100%">

    <mx:HSlider thumbCount="2" minimum="1" maximum="10"/>

   </mx:ControlBar>

  </mx:Panel>

 </mx:Canvas>

</mx:Application>

We think this is a bug.

However, if there is a solution, please keep us posted.

Wilfred

 

And:

Wilfred,

 

      The ControlBar is causing the problem. It is not properly instantiating the Slider control. As a workaround, you can wrap the Slider in a ViewStack and HBox. This will change the instantiation path slightly and get the Slider to show its thumbs. I'll file I bug on this.

 

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

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">

 <mx:Canvas id="bottomPanel">

  <mx:Panel title="My Title">

  <mx:ControlBar >

      <mx:ViewStack>

            <mx:HBox>

                <mx:HSlider id="MySlider" thumbCount="2"/>

            </mx:HBox>

      </mx:ViewStack>

   </mx:ControlBar>

  </mx:Panel>

 </mx:Canvas>

</mx:Application>

 

 

Jason

 


From: Matthew Pflueger [mailto:[EMAIL PROTECTED]
Sent: Monday, March 14, 200511:55 AM
To: [EMAIL PROTECTED]
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