Hi
I would like to use a rad slider in a similar fashion to the configurator examples in the demos with a background that has lines at the different points on the slider. I was trying to work out how you would create the background so that the lines were at the same points as the slider.
I looked at the configurator example and i could not find any obvious mathematical formula or relationship. The background for the slider is 466px wide and there are 4 lines on it. These are at the following points:
100px; 188px; 277px; 365px;
Intuitively i would have imagined there would be an equal distance between slider points but there isn't. There seems to be a distance of 100px between the slider left edge and the first line and also a distance of 100px between the last line and the slider right edge. There is then a distance of 88px between the lines.
There must be a mathematical relationship in the slider implementation to calculate where the slider is position along the slider bar depending on the widht of the slider and the number of values on the slider but it is not immediately obvious to me. Please can you explain this relationship to me so I can make a slider like the configurator
thanks
andrea
I would like to use a rad slider in a similar fashion to the configurator examples in the demos with a background that has lines at the different points on the slider. I was trying to work out how you would create the background so that the lines were at the same points as the slider.
I looked at the configurator example and i could not find any obvious mathematical formula or relationship. The background for the slider is 466px wide and there are 4 lines on it. These are at the following points:
100px; 188px; 277px; 365px;
Intuitively i would have imagined there would be an equal distance between slider points but there isn't. There seems to be a distance of 100px between the slider left edge and the first line and also a distance of 100px between the last line and the slider right edge. There is then a distance of 88px between the lines.
There must be a mathematical relationship in the slider implementation to calculate where the slider is position along the slider bar depending on the widht of the slider and the number of values on the slider but it is not immediately obvious to me. Please can you explain this relationship to me so I can make a slider like the configurator
thanks
andrea
8 Answers, 1 is accepted
0
andieje
Top achievements
Rank 1
answered on 11 Mar 2008, 05:14 PM
Hello
I would be really grateful if someone would be able to look at this post. Other posts i have posted after this one have been answered so I'm just checking this post has not accidentally been overlooked
thanks in advance
andrea
I would be really grateful if someone would be able to look at this post. Other posts i have posted after this one have been answered so I'm just checking this post has not accidentally been overlooked
thanks in advance
andrea
0
Hello Andrea,
The slider does have limited functionality due to hardcoding in this regard and we do plan to make the Slider render steps based on calculations.
These inconsistencies are worked around in the design of the configurator example itself. There is no mathematical formula used here so this example does not have equal distances between points as you have correctly noticed.
However, what you can do for now is take the example's image and edit the points so that they appear equal, and then give the slider the same steps in pixels.
If you cannot do this by yourself, please send us the image and we will do this for you.
Please make sure also, that you give us the exact distance between points.
Kind regards,
Ubong
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
andieje
Top achievements
Rank 1
answered on 12 Mar 2008, 09:17 PM
Hi
I don't really understand your answer
YOur answer suggests that i can specify the position in pixels of each point on the slider. Is this the case? My slider has 9 steps and will be 150px high. How can i tell you the exact distance between the points? My original question to you was to ask you how i can find out where the points will be located along the slider.
thanks again
andrea
I don't really understand your answer
YOur answer suggests that i can specify the position in pixels of each point on the slider. Is this the case? My slider has 9 steps and will be 150px high. How can i tell you the exact distance between the points? My original question to you was to ask you how i can find out where the points will be located along the slider.
thanks again
andrea
0
Hi andieje,
After creating your image, set the width of the slider to be the same as the distance between the first and the last points of the image. Then divide the width of the slider into the number of the points of the image and set the result as a step of the slider. If the result is not a whole number, simply round it to the nearest possible whole number, because you can set only whole numbers (i.e. pixels) as a step of RadSlider.
Sincerely yours,
Martin Ivanov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
After creating your image, set the width of the slider to be the same as the distance between the first and the last points of the image. Then divide the width of the slider into the number of the points of the image and set the result as a step of the slider. If the result is not a whole number, simply round it to the nearest possible whole number, because you can set only whole numbers (i.e. pixels) as a step of RadSlider.
Sincerely yours,
Martin Ivanov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
andieje
Top achievements
Rank 1
answered on 13 Mar 2008, 11:56 PM
Hi
I'm still not really understanding. Firstly my slider is vertical and setting the width property of the slider has no effect on the slider ( i know you didn't tell mw to set the width property on the slider but i'm still confused). My slider has a length of 150px. This renders the slider at about but not exactly 150px high and about 20px of this is the background buttons.
Please can you advise me on what size to make my background image and where to position the graduations on this background image if my slider has a length of 150px and has 9 different values
thanks
I'm still not really understanding. Firstly my slider is vertical and setting the width property of the slider has no effect on the slider ( i know you didn't tell mw to set the width property on the slider but i'm still confused). My slider has a length of 150px. This renders the slider at about but not exactly 150px high and about 20px of this is the background buttons.
Please can you advise me on what size to make my background image and where to position the graduations on this background image if my slider has a length of 150px and has 9 different values
thanks
0
Hi andieje,
The issue with the incorrect rendering of the size of the slider is logged in our database and will be fixed soon. We are sorry we cannot give you a proper advise of how to distribute the points of your ruler, and the only thing I can suggest is to try different images, until you find the one that suits most for your project.
Greetings,
Martin Ivanov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The issue with the incorrect rendering of the size of the slider is logged in our database and will be fixed soon. We are sorry we cannot give you a proper advise of how to distribute the points of your ruler, and the only thing I can suggest is to try different images, until you find the one that suits most for your project.
Greetings,
Martin Ivanov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
andieje
Top achievements
Rank 1
answered on 20 Mar 2008, 12:36 PM
Hi
In a previous reply to this question from Ubong, I was told i could send you the image and you would correct it for me. I would like to do this. Please can you advise who i send the image to
thanks
andrea
In a previous reply to this question from Ubong, I was told i could send you the image and you would correct it for me. I would like to do this. Please can you advise who i send the image to
thanks
andrea
0
Hello Andrea,
Just open a new support ticket and send us the image as an attachment along with a link to this forum thread as a reference. We will check it and do our best to help.
All the best,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Just open a new support ticket and send us the image as an attachment along with a link to this forum thread as a reference. We will check it and do our best to help.
All the best,
Georgi Tunev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center