Page 1 of 1
Bug with Chart Title Font color
Posted: Sun Jul 13, 2014 8:57 am
by 10046032
Hello,
If you drop a Chart into a form and change the title font color to clBtnFace it drawn as yellow (latest TeeChart, Delphi XE6).
Regards
Re: Bug with Chart Title Font color
Posted: Mon Jul 14, 2014 9:41 am
by yeray
Hello
johnnix wrote:If you drop a Chart into a form and change the title font color to clBtnFace it drawn as yellow (latest TeeChart, Delphi XE6).
Take a look at the
TeeChart 2013 What's New document.
It says:
Any color (pen, font, gradient, brush, etc) is now treated as a proper 32bit color with RGB and Alpha components.
The only limitation is pseudo-colors can’t be used (clBtnFace, clWindow, etc).
Re: Bug with Chart Title Font color
Posted: Mon Jul 14, 2014 11:31 am
by 16567921
Ok, so since I need to custom draw the title how can I assign the same color as the background?
Re: Bug with Chart Title Font color
Posted: Mon Jul 14, 2014 11:59 am
by yeray
Hello,
johnnix wrote:Ok, so since I need to custom draw the title how can I assign the same color as the background?
I'm not sure to understand it. If you are making reference to something discussed in another thread, please kindly provide the link to that discussion.
Otherwise, please try to explain with more detail what are you trying to achieve.
Re: Bug with Chart Title Font color
Posted: Mon Jul 14, 2014 4:34 pm
by 16567921
Hello Yeray,
If you look at the screenshot you see that I need set the color of the title to match the color of the background, since the background color is clBtnFace how can I assign this to the title?
Regards
Re: Bug with Chart Title Font color
Posted: Tue Jul 15, 2014 1:24 pm
by yeray
Hello,
This seems to work fine for me here:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Gradient.Visible:=false;
Chart1.Walls.Back.Gradient.Visible:=false;
Chart1.Walls.Back.Color:=clWhite;
Chart1.Title.Font.Size:=20;
Chart1.Title.Font.Color:=Chart1.Color;
end;
Re: Bug with Chart Title Font color
Posted: Tue Nov 04, 2014 7:27 pm
by 16567921
Hello,
Attached is a project file, the clWhite button works fine but the clBtnFace button turns the font color to yellow.
Regards
Re: Bug with Chart Title Font color
Posted: Thu Nov 06, 2014 9:06 am
by yeray
Hi,
Unfortunately, the "A" in RBGA is used to identify the special colors in VCL (clNone, clDefault, clBtnFace,...) so it can't be used for the transparency.
However, you can convert these special colors to regular colors using ColorToRGB function:
Code: Select all
Chart1.Color := ColorToRGB(clBtnFace);
Re: Bug with Chart Title Font color
Posted: Thu Nov 06, 2014 5:48 pm
by 16567921
Hello Yeray,
That did the trick, thank you very much!
Regards