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

Set Size of Resizeable Scrollbar

4 Answers 155 Views
TimeBar
This is a migrated thread and some comments may be shown as answers.
KO
Top achievements
Rank 1
KO asked on 02 May 2011, 06:42 PM
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...)

4 Answers, 1 is accepted

Sort by
0
Missing User
answered on 06 May 2011, 08:03 AM
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
0
KO
Top achievements
Rank 1
answered on 06 May 2011, 03:07 PM
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
0
Accepted
Missing User
answered on 12 May 2011, 07:41 AM
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
0
KO
Top achievements
Rank 1
answered on 12 May 2011, 04:50 PM
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!
Tags
TimeBar
Asked by
KO
Top achievements
Rank 1
Answers by
Missing User
KO
Top achievements
Rank 1
Share this question
or