Bug with Chart Title Font color

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Bug with Chart Title Font color

Post by johnnix » Sun Jul 13, 2014 8:57 am

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
Attachments
Screenshot 2014-07-13 11.52.gif
Screenshot 2014-07-13 11.52.gif (17.73 KiB) Viewed 19562 times

Yeray
Site Admin
Site Admin
Posts: 9615
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Bug with Chart Title Font color

Post by Yeray » Mon Jul 14, 2014 9:41 am

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).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

johnnix
Newbie
Newbie
Posts: 38
Joined: Thu Nov 28, 2013 12:00 am

Re: Bug with Chart Title Font color

Post by johnnix » Mon Jul 14, 2014 11:31 am

Ok, so since I need to custom draw the title how can I assign the same color as the background?

Yeray
Site Admin
Site Admin
Posts: 9615
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Bug with Chart Title Font color

Post by Yeray » Mon Jul 14, 2014 11:59 am

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

johnnix
Newbie
Newbie
Posts: 38
Joined: Thu Nov 28, 2013 12:00 am

Re: Bug with Chart Title Font color

Post by johnnix » Mon Jul 14, 2014 4:34 pm

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

Yeray
Site Admin
Site Admin
Posts: 9615
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Bug with Chart Title Font color

Post by Yeray » Tue Jul 15, 2014 1:24 pm

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;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

johnnix
Newbie
Newbie
Posts: 38
Joined: Thu Nov 28, 2013 12:00 am

Re: Bug with Chart Title Font color

Post by johnnix » Tue Nov 04, 2014 7:27 pm

Hello,

Attached is a project file, the clWhite button works fine but the clBtnFace button turns the font color to yellow.

Regards
Attachments
Project1.zip
(6.37 KiB) Downloaded 1110 times

Yeray
Site Admin
Site Admin
Posts: 9615
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Bug with Chart Title Font color

Post by Yeray » Thu Nov 06, 2014 9:06 am

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);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

johnnix
Newbie
Newbie
Posts: 38
Joined: Thu Nov 28, 2013 12:00 am

Re: Bug with Chart Title Font color

Post by johnnix » Thu Nov 06, 2014 5:48 pm

Hello Yeray,

That did the trick, thank you very much!

Regards

Post Reply