emulating the configurator example

9 posts, 0 answers
  1. andieje
    andieje avatar
    473 posts
    Member since:
    Oct 2006

    Posted 08 Mar 2008 Link to this post

    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
  2. andieje
    andieje avatar
    473 posts
    Member since:
    Oct 2006

    Posted 11 Mar 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ubong
    Admin
    Ubong avatar
    328 posts

    Posted 12 Mar 2008 Link to this post


    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
  5. andieje
    andieje avatar
    473 posts
    Member since:
    Oct 2006

    Posted 12 Mar 2008 Link to this post

    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
  6. Martin
    Admin
    Martin avatar
    585 posts

    Posted 13 Mar 2008 Link to this post

    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
  7. andieje
    andieje avatar
    473 posts
    Member since:
    Oct 2006

    Posted 13 Mar 2008 Link to this post

    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
  8. Martin
    Admin
    Martin avatar
    585 posts

    Posted 20 Mar 2008 Link to this post

    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
  9. andieje
    andieje avatar
    473 posts
    Member since:
    Oct 2006

    Posted 20 Mar 2008 Link to this post

    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
  10. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 24 Mar 2008 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017