Tutorial for zooming scrolling and panning

TeeChart for ActiveX, COM and ASP
Post Reply
hansw
Newbie
Newbie
Posts: 59
Joined: Fri Nov 15, 2002 12:00 am

Tutorial for zooming scrolling and panning

Post by hansw » Mon Jan 05, 2004 1:11 am

Is it possible to get these VB examples translated to VC++

http://www.teechart.net/support/modules ... =0&thold=0

I've just spent 2 hours searching and am only able to find some bits..

// alows me to use the slider nPos value to expand from zero

m_Chart1.GetAxis().GetBottom().SetAutomatic(false);
m_Chart1.GetAxis().GetBottom().SetMinimum(0);
m_Chart1.GetAxis().GetBottom().SetMaximum(nPos);

Once expanded, I ned to use another slider to scroll across at the current zoom level.

I think this part of thr VB tutorial is what I need.
With Chart1 do
AllowPanning := pmHorizontal; //permit manual scrolling horizontally only.
BottomAxis.Automatic := False;
//limit display to 5 points onscreen
ChartScrollBar1.Chart := Chart1;
ChartScrollBar1.Kind := sbHorizontal;
ChartScrollBar1.Min := 0;
ChartScrollBar1.Max := 20;
End;

I've searched the .h files and have not found any mention of a ScrollBar class. Perhaps it's named something else.
What is ChartScrollBar1 and where are the .h amd .cpp files for it ?

I think this example makes a joke of the claim that VB examples are easiliy translated to VC++ ;

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Jan 05, 2004 9:03 am

Hi --
I think this example makes a joke of the claim that VB examples are easiliy translated to VC++ ;
The example is written in Delphi :D

The Chart ScrollBar component allows scrolling of series points, setting the axis minimum and maximum values. It is a Delphi VCL component and is not available in the TeeChart Pro ActiveX Control.

In fact, the Chart ScrollBar is easy to reproduce in any of the different IDEs within MS Visual Studio ... it is simply a horizontal scroll bar with the minimum value set to 0 and the maximum to IValueList.Count and with the onscroll event firing the IAxis.Scroll method.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

hansw
Newbie
Newbie
Posts: 59
Joined: Fri Nov 15, 2002 12:00 am

Scroll method Where/How

Post by hansw » Mon Jan 05, 2004 2:08 pm

There are no scroll method showing up in the hints... !

m_Chart1.GetAxis().Scroll ????

Please give me an example.

VB Delphi same crap.. :D

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Wed Jan 07, 2004 7:03 am

Hi --
There are no scroll method showing up in the hints... !

m_Chart1.GetAxis().Scroll ????

Please give me an example.
Sure. Try:

Code: Select all

m_Chart1.GetAxis().GetBottom().Scroll(100, false);
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply