Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 641

Summary: clwindowtext not drawn in GDI+
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: CanvasAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: david, sde.jt3
Priority: ---    
Version: 131119   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=3&t=14770
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: clWindowsText

Description yeray alonso 2014-03-17 10:19:22 EDT
Created attachment 120 [details]
clWindowsText

clwindowtext doesn't seem to work from v2013.09.

The project attached works fine with v2013.08 but not with v2013.09.

This color works fine if I change to GDI.
Comment 1 david berneda 2014-03-17 10:29:47 EDT
Yes, this is "as designed".

In GDI+ "special" VCL colors like clXXX cannot be used. 
GDI+ only accepts "real" colors like clRed, clGreen, etc.

In Firemonkey this is not a problem because "special" colors in Firemonkey do not exist anymore. Firemonkey only has "real" ARGB colors.

The solution for VCL is to use the ColorToRGB function, which converts from "special" to "real":

    Font.Color:=ColorToRGB(clwindowtext);

There is special code in VCL TChart to control this problem for panel Color background (ie: Chart1.Color), but it can't be done for all colors everywhere, everytime.