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

Adjust Slider Handle

6 Answers 297 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Angelo
Top achievements
Rank 1
Angelo asked on 07 Nov 2011, 05:18 AM
Nice-to-have suggestion: the ability to change the slide handle width. The height is fine, but on mobile devices, I think being able to increase the width will make it more user-friendly for the fat-fingered types.

6 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 08 Nov 2011, 04:55 PM
Hello Angelo,

Currently all widths and heights that are related to the Slider and its elements are defined in the kendo.common.css file. Some other styles, such as margins and positioning, also depend on the mentioned sizes. Changing all these via configuration properties would be a complex and cumbersome task even for you as a developer. That's why currently we don't plan to introduce such a capability. In order to apply custom dimensions to the Slider, it is recommended to do one of the following:

1) append a custom CSS class to the Slider wrapper and use it to override the styles in the kendo.common.css file.

or

2) create a custom kendo.common.css file with the desired sizes in it

On a side note, the Slider's side buttons should be easier to use even by people with larger fingers.
Best wishes,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Angelo
Top achievements
Rank 1
answered on 08 Nov 2011, 05:06 PM
Yes, I tried poring over the code yesterday, and it would be a daunting task to make the changes you mentioned (took some time to create a sprite with larger images, but once I got to the code, I just kinda gave up).

I know how finicky my users can get about seemingly menial things like the slider handle size, so I think I'll add spinner buttons to the left and right of the range sliders in order to take care of this.

Thanks for the follow-up. Looking forward to the first official release!
0
Kjell
Top achievements
Rank 1
answered on 03 Apr 2012, 08:38 PM
Hi, sorry to bump an old thread but I was asked to do the same thing, well actually make it bigger all around.  I was able to do it by adding this CSS to my page:

.k-slider .k-draghandle
 {
   -moz-border-radius: 9px;
   -webkit-border-radius: 9px;
   border-radius: 9px;   
   height: 20px;
   width: 20px;                                           
 }

The only problem is the handle is not centered vertically on the slider bar.  Does anyone know how to accomplish that?

 




 


0
Kjell
Top achievements
Rank 1
answered on 04 Apr 2012, 08:17 AM
Nevermind I got it.  Adding "position: relative;" to the CSS centered the button but also added the word "Drag" to it.  I edited the kendo.slider.min.js file and replaced "Drag" with "    ".
0
Dimo
Telerik team
answered on 04 Apr 2012, 08:24 AM
Hello Kjell,

You need to adjust also the draghandle's top (or left for vertical sliders) style property values - these position the draghandle with regard to the track. The default value for both top and left is -4px.

Greetings,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Kjell
Top achievements
Rank 1
answered on 04 Apr 2012, 08:33 AM
Thanks Dimo, I don't know why I didn't try that before messing with position, but it works better than my solution.
Tags
Slider
Asked by
Angelo
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Angelo
Top achievements
Rank 1
Kjell
Top achievements
Rank 1
Share this question
or