Change font color of TAdvChartColorSelector?

Hi,

I am writing an application using VCL themes, as we all know there are some issues with using TMS components in themed apps. I really like the color selector, and changing the button face to the themed system color is no problem. This all works nicely for light themes by just setting the component's color, however for dark themes the small lightness difference between button face and text color makes the text hard to read.

Funny enough, the component picks up the font face from the parent, so I can have whichever font as application font, but the font color is not picked up. For the button face I can light it up for such cases, however this contrasts with the rest of the components quite heavily in very dark themes. Sample code for this modification:  

const
  cLightLimit: integer= 70;
var
  col: integer;
  hue, sat, light: integer;
begin
  //--  create button face in contrast to text color (hardcoded black / TMS).
  col := TStyleManager.ActiveStyle.GetSystemColor (clBtnFace);
  RGBToHSL (col, hue, sat, light);
  if light < cLightLimit then
    col := HSLtoRGB (hue, sat, cLightLimit);
  //--  set appropriate face color.
  COLSEL_Foreground.Color := col;
end;

Is there any way to access / modify the component's text color? Alternatively, are the color pickers available as a popup w/o the button component? I could use a standard button then and popup the selector then.

Thanks!
Matthias

Hi,


Can you try with by changing the CharFont property?

Hi Pieter,


unfortunately not: property CharFont is only available in the CharacterSelector which is not part of the ColorSelector.

Matthias