Hi
When I apply a theme to my chart using the ApplyChartTheme method, 2 TGridBandTool objects are added to the grid's declaration, both with the same name GridBandTool1.
object GridBandTool1: TGridBandTool
Band1.Color = 15329769
Band2.Color = clWhite
AxisID = 2
end
object GridBandTool1: TGridBandTool
Band1.Color = 15329769
Band2.Color = clWhite
AxisID = 2
end
This does not cause an error immediately. However the user has the ability to then save the current chart settings to a database using SaveChartToStream. When the settings are later reloaded using LoadChartFromStream, I get an error message.
What is causing this behaviour?
TGridBandTool Duplicate Name
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi nathean,
I haven't been able to reproduce what you report. Using v7.06 and the code below, the generated .tee file only has one TGridBandTool object declared on it. Could you please modify the code or send an example we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
BTW: Which TeeChart version are you using?
I haven't been able to reproduce what you report. Using v7.06 and the code below, the generated .tee file only has one TGridBandTool object declared on it. Could you please modify the code or send an example we can run "as-is" to reproduce the problem here?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
BTW: Which TeeChart version are you using?
Code: Select all
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, TeeComma, ExtCtrls, TeeProcs, TeEngine, Chart, TeeThemes,
Series, TeeStore, TeeEditPro;
type
TForm1 = class(TForm)
Chart1: TChart;
TeeCommander1: TTeeCommander;
Button1: TButton;
Series1: TBarSeries;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
ApplyChartTheme(TFactsTheme,Chart1,-1);
SaveChartToFile(Chart1,'e:\temp\theme.tee',true,true);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues();
end;
end.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |