Set Size of Resizeable Scrollbar

5 posts, 1 answers
  1. KO
    KO avatar
    16 posts
    Member since:
    Apr 2010

    Posted 02 May 2011 Link to this post

    Is it possible to set the size of the resizeable Scrollbar programatically? I define the Month, Week, Day and Hour intervals in the xaml. My data contains 24 hourly buckets for each day. The interval defaults to Hours, which is perfect, but the resizeable scroll bar defaults to its thinnest, or least condensed width. I would like to set it in the code-behind to the most condensed width within the Hours interval -  that is, the width just before the width that would cause the ItemIntervalChanged event to fire to signal the change from Hours to Days. That way more of my Hourly buckets would display by default. Is this possible?

    KO

    (PS - I absolutely love the timebar. Saved me weeks in a current project...)
  2. Missing user
    Missing user avatar

    Posted 06 May 2011 Link to this post

    Hello,

    Thank you for contacting Telerik Support and choosing RadTimeBar.

    You can determine the visible range that will be firstly displayed by setting VisiblePeriodStart and VisiblePeriodEnd properties. This will also affect the size of the slider and the current interval labels. You can set these properties in code behind too. Basically the drill between two intervals occurs when there is enough space to show the labels from the next interval.
    Could you please provide more information about the result which you want to achieve, for example images which illustrates it. Thank you in advance for your cooperation.

    Kind regards,
    Polina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. KO
    KO avatar
    16 posts
    Member since:
    Apr 2010

    Posted 06 May 2011 Link to this post

    I've attached two pics. DEFAULT.PNG shows the timebar immediately after it is first rendered. DESIRED.PNG shows the same area after I have manually increased the size of the scrollbar using the mouse wheel. Note that the interval is Hours in both cases, and no settings have changed. Only the width of the resizable scrollbar has changed. I just want to change its width programmatically instead of manually.

    Thank you!

    KO
  5. Answer
    Missing user
    Missing user avatar

    Posted 12 May 2011 Link to this post

    Hello KO,

    As I mentioned in my previous post, when the TimeBar control is loaded, the Slider width is calculated depending on the preset visible period range. Basically the Slider width represents the ratio of the visible period to the whole TimeBar period. You can determine the Slider width by setting VisiblePeriodStart  and VisiblePeriodEnd properties. In the attached file you can find a sample example how to set the desired first render appearance of the TimeBar control. I hope that this helps.

    Greetings,
    Polina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. KO
    KO avatar
    16 posts
    Member since:
    Apr 2010

    Posted 12 May 2011 Link to this post

    I don't think what I'm wanting to do is possible - or even necessary given how the TimeBar works. The default behavior is perfectly acceptable, though, so consider this one closed. Thank you!
Back to Top
DevCraft banner