Problem to apply aces color settings on program startup

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Messie
Newbie
Newbie
Posts: 34
Joined: Wed Apr 13, 2005 4:00 am
Location: Goettingen, Germany

Problem to apply aces color settings on program startup

Post by Messie » Wed Jul 13, 2005 8:09 am

In have to setup axes color (Ticks and gride etc.) on the program startup. Axes colors are read from a file.
My problem is: if I apply the colors on startup in the OnShow procedure of the Mainform, it works correctly. If I use the same code in a different unit, I get the designtime colors. Changes only are applied when I create a setup form where graph.title.color is linked to a TButtonColor and this is clicked once.

What prevents the colors from being updated? Applying the Graph.color works fine

Messie

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jul 13, 2005 11:11 am

Hi Messie,

Which TeeChart version are you using? It works fine for me using latest version available (v7.04) and this code below:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  With Chart1.Axes do
  begin
    Left.Grid.Color:=clRed;
    Left.Ticks.Color:=clBlue;
    Bottom.Grid.Color:=clRed;
    Bottom.Ticks.Color:=clBlue;
  end;
end;
When clicking Button1 axes grid and tick colors changes from default to red and blue respectively.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply