I've tried to disable the zooming function in both Borland C++ builder 6 and Delphi 5. Works in Delphi but not in C++
Code fragment where I am disabling it is pretty simple:
TeePlotChart->Zoom->Allow = false;
Can't see any reason why this shouldn't work. Have build a very simple test application with only a chart and a couple of lines of code (the one above for instance) to make sure no other side effects are causing the problem
Sound familiar to anyone ??
Bill
[/code]
Disabling Zoom on a chart in C++ Builder
Hi, Bill.
Which TeeChart version are you using ? Does it work if you disable it at design time (via chart editor) ? Also, I've tried the following code (BCB6, TC 6.01) and it worked fine:
Which TeeChart version are you using ? Does it work if you disable it at design time (via chart editor) ? Also, I've tried the following code (BCB6, TC 6.01) and it worked fine:
Code: Select all
Chart1->Zoom->Allow = false;
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Hi Marjan
I'm using BCB6 and TC6.01. I have attached the complete code fragment from my test application. It has a form with a Tee Chart, and two buttons. Button1 sets up a fast line series and button two sets the allow Zoom to false.
What I'm trying to do is stop the rubber banding of a section of the screen and subsequent zoom to that region from working when the user is panning the graph with the hand. I would expect setting the Zoom->allow to false to achieve this, but after doing this, I'm still able to rubber band it and zoom.
Interestingly, if I set the same property (Zoom->Allow = false) at design time, it does stop the zoom from working !!!!
Setting it at run time seems to have no effect in BCB.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TFastLineSeries *tmpFastLineSeries;
TeePlotChart->Legend->LegendStyle = lsSeries;
tmpFastLineSeries = new TFastLineSeries(this);
TeePlotChart->AddSeries(tmpFastLineSeries);
tmpFastLineSeries->FillSampleValues(30);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
TeePlotChart->Zoom->Allow = false;
}[/code]
I'm using BCB6 and TC6.01. I have attached the complete code fragment from my test application. It has a form with a Tee Chart, and two buttons. Button1 sets up a fast line series and button two sets the allow Zoom to false.
What I'm trying to do is stop the rubber banding of a section of the screen and subsequent zoom to that region from working when the user is panning the graph with the hand. I would expect setting the Zoom->allow to false to achieve this, but after doing this, I'm still able to rubber band it and zoom.
Interestingly, if I set the same property (Zoom->Allow = false) at design time, it does stop the zoom from working !!!!
Setting it at run time seems to have no effect in BCB.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TFastLineSeries *tmpFastLineSeries;
TeePlotChart->Legend->LegendStyle = lsSeries;
tmpFastLineSeries = new TFastLineSeries(this);
TeePlotChart->AddSeries(tmpFastLineSeries);
tmpFastLineSeries->FillSampleValues(30);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
TeePlotChart->Zoom->Allow = false;
}[/code]
Hi Bill,
have you tried using :
TeePlotChart->AllowZoom = false;
instead of :
TeePlotChart->Zoom->Allow = false;
Josep Lluis Jorge
http://support.steema.com
have you tried using :
TeePlotChart->AllowZoom = false;
instead of :
TeePlotChart->Zoom->Allow = false;
Josep Lluis Jorge
http://support.steema.com