Page Control by TChartScrollBar

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
AMS
Newbie
Newbie
Posts: 24
Joined: Wed Mar 31, 2004 5:00 am
Location: South Africa
Contact:

Page Control by TChartScrollBar

Post by AMS » Wed Jul 28, 2004 3:02 pm

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

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Jul 30, 2004 9:46 am

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".

AMS
Newbie
Newbie
Posts: 24
Joined: Wed Mar 31, 2004 5:00 am
Location: South Africa
Contact:

Post by AMS » Wed Aug 04, 2004 8:12 am

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.

Post Reply