Tutorial for zooming scrolling and panning
Posted: 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++ ;
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++ ;