Hi,
switching from XP to Vista to Win7 I have learnt that I can use
DesktopFont := true;
to adopt the appliction to the standard fonts of the operating system.
TeeChart defines a lot of fonts (according to the chart editor). It seems that these fonts do not adopt to the desktop font.
How to achieve the correct behaviour or how to set all fonts by the application program (do I really need to define the font of each TeeChart component) ?
Thanks
Uli
How to set all TeeChart Fonts
Re: How to set all TeeChart Fonts
Hello Uli,
-Open TChart Editor
-Select Tabs Chart->General->Fonts.
-Select All Fonts with checkbox.
-Select to the Name font as you want, with comboBox.
I hope will helps.
Thanks,
I have added your request in wish list with number [TV52015164]to be revised in future releases.switching from XP to Vista to Win7 I have learnt that I can use DesktopFont := true; to adopt the appliction to the standard fonts of the operating system.TeeChart defines a lot of fonts (according to the chart editor). It seems that these fonts do not adopt to the desktop font.
You can define font of each TeeChart components for example in design time with Editor, following next steps:How to achieve the correct behaviour or how to set all fonts by the application program (do I really need to define the font of each TeeChart component) ?
-Open TChart Editor
-Select Tabs Chart->General->Fonts.
-Select All Fonts with checkbox.
-Select to the Name font as you want, with comboBox.
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / 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 |
Re: How to set all TeeChart Fonts
Hello Sandra,
setting the fonts by the ChartEditor is clear.
But I like to define/change it at runtime. Then I can e.g. automatically set the font to Screen.IconFont (which may vary from XP to Vista to Windows7) How to set the different control.font properties at runtime?
Regards, Uli
setting the fonts by the ChartEditor is clear.
But I like to define/change it at runtime. Then I can e.g. automatically set the font to Screen.IconFont (which may vary from XP to Vista to Windows7) How to set the different control.font properties at runtime?
Regards, Uli
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: How to set all TeeChart Fonts
Hi Uli,
In that case you can do something similar to what the editor does (see example below). If you are a source code customer you can have a look at TeeEdiGene.pas.
In that case you can do something similar to what the editor does (see example below). If you are a source code customer you can have a look at TeeEdiGene.pas.
Code: Select all
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeEngine, Series, TeeComma, ExtCtrls, TeeProcs, Chart, StdCtrls,
TeCanvas;
type
TForm1 = class(TForm)
Chart1: TChart;
TeeCommander1: TTeeCommander;
Series1: TBarSeries;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
FontList : TStringList;
function SelectedFont(Index:Integer):TTeeFont;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses TeeEdiGene;
function TForm1.SelectedFont(Index:Integer):TTeeFont;
var tmp : TObject;
begin
tmp:=FontList.Objects[Index];
if tmp is TTeeCustomShape then
result:=TTeeCustomShape(tmp).Font
else
if tmp is TChartAxis then
result:=TChartAxis(tmp).LabelsFont
{$IFDEF D6}
else
if tmp is TChartSeries then
result:=FontOfPersistent(tmp as TPersistent,TChartSeries(tmp).Marks.Font)
else
result:=FontOfPersistent(tmp as TPersistent);
{$ELSE}
else
result:=nil;
{$ENDIF}
end;
procedure TForm1.FormCreate(Sender: TObject);
var t : Integer;
tmp : TTeeFont;
begin
FontList:=TStringList.Create;
FontList.Clear;
TFormTeeGeneral.GetChartObjects(Chart1, FontList, True);
for t:=0 to FontList.Count-1 do
begin
tmp:=SelectedFont(t);
tmp.Name:='Times New Roman';
tmp.Size:=14;
tmp.Style:=[fsBold];
tmp.Color:=clRed;
tmp.InterCharSize:=5;
tmp.Shadow.HorizSize:=5;
tmp.Shadow.VertSize:=12;
tmp.Shadow.Color:=clRed;
tmp.Shadow.Visible:=True;
tmp.Shadow.Transparency:=50;
tmp.Shadow.Smooth:=True;
tmp.Gradient.Visible:=True;
end;
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 |
Re: How to set all TeeChart Fonts
Hi Narcís,
thanks. I have already looked at TeeEditGene.pas and found the code for GetChartObjects.
I appreciate your example code.
Uli
thanks. I have already looked at TeeEditGene.pas and found the code for GetChartObjects.
I appreciate your example code.
Uli