Page 1 of 1

Page Control by TChartScrollBar

Posted: Wed Jul 28, 2004 3:02 pm
by 9231947
Hi All

I have an application that can draw different types of graphs depending on user selections. When the choice is histogram (THorizBarSeries), I split the result over multiple pages when the number of bars become excessive. I do this by changing the MaxPointsPerPage for the chart from 0 to whatever is appropriate.

When I do this, I make a TChartScrollBar visible as well to use as a navigator for my different pages. This allows me to use the same control to traverse pages, as what I would use to scroll other types of graphs.

The problem is, my TChartScrollBar does not seem to have any effect on the displayed page.

My scroll bar is set up as follows:
It's Axis = 'sbDefault', it's Kind = 'sbVertical' and it's Chart is set to the chart I want to control.

Is what I am trying to do possible? If so, how must I go about it?

Thanks in advance
Hendrik

Posted: Fri Jul 30, 2004 9:46 am
by Pep
Hi Hendrik,
Is what I am trying to do possible? If so, how must I go about it?
Yes, this can be done, but you should use similar code that in the "ScrollBar" example that you can find in the Demo Features project (included in the TeeChart Pro installation), do a seach for "ScrollBar".

Posted: Wed Aug 04, 2004 8:12 am
by 9231947
Thanks, I got it going. The secret is to remove the Axis property from the scroll bar, otherwise you get a Scrollbar->Axis->Scrollbar->Axis.... event, that causes a stack overflow.