RadTrackBar as time periode selector

4 posts, 0 answers
  1. Marco
    Marco avatar
    87 posts
    Member since:
    Apr 2011

    Posted 18 Aug 2014 Link to this post

    Hello,

    I have started to use a RadTrackBar to select a range of date. As the radtrackbar only support Integer type for the value, I convert the control value to date with a reference date which represent value 0 on the control. It's working fine.

    I have just a little question about the visual tick.

    The total range in the RadTrackBar represent a year and a few month and it isn't really human readable with a visual tick on every day. So I want to put a tick on each value representing the first day of a month (with a label) instead. As the number of day in a month isn't fixed, it isn't possible to use the Frequency property of the control to draw theses ticks.

    Is there a way to place tick on specific value (0,31,59,90,121, etc...) ?

    Thanks for reading

    Marco Guignard
  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 21 Aug 2014 Link to this post

    Hello Marco,

    Thank you for writing.

    RadTrackBar introduces TickFormatting and LableFormatting events in order to facilitate the standard customization through the element tree of the control. In the TickFormatting event handler you can set the TickElement.Visibility property to Collapsed for all the ticks that you want to hide. The same approach can be followed for the LabelElement in the LableFormatting event. You can refer to TrackBar >> Customization help article about this topic. If this is not suitable for your specific case, please specify in more details the expected design. Any sample screenshots would be greatly appreciated.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Marco
    Marco avatar
    87 posts
    Member since:
    Apr 2011

    Posted 21 Aug 2014 in reply to Dess Link to this post

    Hi Desislava,

    I will try to play around with the TickFormatting and LabelFormatting event.

    Convert the value back to a date, test for beeing the first day in date and collapse the tick on failure.

    Thanks for the idea

    Marco Guignard


  5. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 26 Aug 2014 Link to this post

    Hello Marco,

    Thank you for writing back.

    I am glad that the suggested solution seems to suit your requirement. If you have any additional questions, please just let me know.

    Regards,
    Desislava
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top