Page 1 of 1

Problem to apply aces color settings on program startup

Posted: Wed Jul 13, 2005 8:09 am
by 9236620
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

Posted: Wed Jul 13, 2005 11:11 am
by narcis
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.