I have a bunch of SampleLineSeries, and I want to add a scrollbar to my window.
So i add it alright, and am trying to update the scrollbar based on where my window is.
So, in my Range Changed event, I do the following:
scroll.Minimum = 0;
scroll.Maximum = 16000; <-- sample maximum. I do have a delta that is very small, .00125 or something
scroll.Value = (range.max-range.min)/.00125 <-- lets say 8000 in this example
Here's my question: How do i tell how wide the scrollbar is? I'm referring to the actual rectangle you click with your mouse to drag.
For me, its very small when im zoomed out. I don't know how to tell it "you're using 50% of your range, so make the button very large).
Thanks!
ViewXY scrollbar range questions
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: ViewXY scrollbar range questions
It seems you have not set LargeChange property, which tells the 'page' length.
Please take a look at Winforms demo app's Simple tutorials / Scrollbar example. There's a problem some LC versions that may prevent scrollbar from appearing in because of automatic margins setting. If you don't see scrollbar there, set ViewXY.AxisLayout.AutoAdjustMargins = false.
Investigate this example's code on how to set the LargeChange.
Please take a look at Winforms demo app's Simple tutorials / Scrollbar example. There's a problem some LC versions that may prevent scrollbar from appearing in because of automatic margins setting. If you don't see scrollbar there, set ViewXY.AxisLayout.AutoAdjustMargins = false.
Investigate this example's code on how to set the LargeChange.
LightningChart Support Team, PT
-
- Posts: 183
- Joined: Tue Mar 18, 2014 2:55 pm
Re: ViewXY scrollbar range questions
Thanks. I didn't think that the scrollbar width could be affected by large/small change. I'll use the sample app you keep suggesting!