ViewXY scrollbar range questions

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Arction_LasseP

greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

ViewXY scrollbar range questions

Post by greggorob64 » Fri Aug 08, 2014 7:55 pm

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!
Image

User avatar
ArctionPasi
Posts: 1366
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: ViewXY scrollbar range questions

Post by ArctionPasi » Sat Aug 09, 2014 8:44 am

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.
Scrollbar example
Scrollbar example
scrollbar_example.jpg (345.05 KiB) Viewed 6632 times
Investigate this example's code on how to set the LargeChange.
LightningChart Support Team, PT

greggorob64
Posts: 183
Joined: Tue Mar 18, 2014 2:55 pm

Re: ViewXY scrollbar range questions

Post by greggorob64 » Mon Aug 11, 2014 12:39 pm

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!

:D