Two other questions...

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Jan
Newbie
Newbie
Posts: 24
Joined: Fri Nov 15, 2002 12:00 am
Location: Germany

Two other questions...

Post by Jan » Thu Jan 15, 2004 9:10 am

For the same program (post below) i have two more questions. Is it possible to change the preselection of the save button in the TeeCommander? I dont want it on the Tee file fiilter, but on another file-format
The second question is: is there a possibility to avoid that the user can delete axes in the Chart-Editor dialog? I am offering this dialog (with Hide main := True/ delphi7) to the user to customize his chart. BUt when one the custom axes is deleted i am getting some problems. Do i have to check this after the program returns from ChartEditor.Execute or is there another way? I am not really keen with the idea to diable all deletings, because it should be possible to remove things like tools...

Jan

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

Post by Pep » Fri Jan 30, 2004 11:21 am

Hi Jan,
For the same program (post below) i have two more questions. Is it possible to change the preselection of the save button in the TeeCommander? I dont want it on the Tee file fiilter, but on another file-format
You can change this using :
uses TeeConst;
TeeMsg_TeeExtension := 'xyz' ; // <-- by default is: 'tee'
The second question is: is there a possibility to avoid that the user can delete axes in the Chart-Editor dialog? I am offering this dialog (with Hide main := True/ delphi7) to the user to customize his chart. BUt when one the custom axes is deleted i am getting some problems. Do i have to check this after the program returns from ChartEditor.Execute or is there another way? I am not really keen with the idea to diable all deletings, because it should be possible to remove things like tools...
You can hide the Axis tab in the TeeChart Editor using this method :

Unit
TeeEdit

Description
Use this property to hide TeeChart Editor tabs.

TChartEditorHiddenTabs=set of TChartEditorTab;

Thus to hide Editor tabs you need to subtract TChartEditorHiddenTabs from the default set of available tabs (all).

Example :

Code: Select all

procedure TChartEditorForm.CheckBox1Click(Sender: TObject);
Var NewTabs:TChartEditorHiddenTabs;
begin
  NewTabs:=[cetTools,cetExport,cetPrintPreview,cetSeriesData,cetAxis];

  if CheckBox1.Checked then
     ChartEditor1.HideTabs:=ChartEditor1.HideTabs-NewTabs
  else
     ChartEditor1.HideTabs:=ChartEditor1.HideTabs+NewTabs
end;

Jan
Newbie
Newbie
Posts: 24
Joined: Fri Nov 15, 2002 12:00 am
Location: Germany

Thanks! But more axes...

Post by Jan » Thu Feb 05, 2004 2:05 pm

The first tip is very helpfull! Thanks for that. But with the second i am not really glad. It should be possible to modify axes and thus letting the user customize his chart. I just need the possibility to that it is impossible to delete an axis.

What is the bet way to do zoom custom axes automatically. Include them in the OnZoom event of the chart itself? Do you have a simple example code for thebest way to do so?

What do you think about a possibility to check if an axis is already created ( defined as a global variable). What would you prefer, or better: what do you think is the best way.

On the other hand is there a bug in the Series/data source/function page? Sometimes the old series (to be selected) are not deleted after a Remove all Series command. After generating the next chart sometimes old series are still available. (Delphi 7/ TeeChart6)

Thanks Jan

Post Reply