This is a migrated thread and some comments may be shown as answers.

Slider: Client Side Width As Drag

0 Answers 36 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Dave Myers
Top achievements
Rank 1
Dave Myers asked on 14 Oct 2009, 08:04 PM
Thought I would share since I didn't see this posted anywhere.

What I wanted to do was to increase the size of the slider, and maximum value as the user dragged the drag handle to the end of the slider.  If it was at the maximum value, it should increase the size of the slider to allow for more valus to be selected.
server side:
slider.Width = 365 
slider.SmallChange = 1 
slider.LargeChange = 1 
slider.IsSelectionRangeEnabled = True 
slider.SelectionStart = 0 
slider.SelectionEnd = 360 
slider.OnClientSlideEnd = "sliderEndSlide" 
client side:
function sliderEndSlide(sender, args) { 
        if (sender.get_selectionEnd() == sender.get_maximumValue()) { 
            sender.set_width(sender.get_maximumValue() + 28); 
            sender.set_maximumValue(sender.get_maximumValue() + 28); 
            sender.redraw(); 
        } 
    } 
this will increase the slider by 28 every time you put the slider handle at the maximum value.


No answers yet. Maybe you can help?

Tags
Slider
Asked by
Dave Myers
Top achievements
Rank 1
Share this question
or