Recent

Author Topic: [SOLVED] System color to TFPColor  (Read 3177 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1055
[SOLVED] System color to TFPColor
« on: November 13, 2014, 06:53:02 pm »
Hi,

I need to convert system color (like clHighlight, clBtnText etc) into TFPColor. Function TColorToFPColor has comment "does not work on system color" and indeed it doesn't work (I always get black color). Many other color functions has this same comment. How to workaround this?

Regards
« Last Edit: November 13, 2014, 07:57:06 pm by Dibo »

circular

  • Hero Member
  • *****
  • Posts: 4402
    • Personal webpage
Re: System color to TFPColor
« Reply #1 on: November 13, 2014, 07:50:14 pm »
You can call ColorToRGB to get the actual color. So something like ColorToFPColor(ColorToRGB(...)) will do.
Conscience is the debugger of the mind

Dibo

  • Hero Member
  • *****
  • Posts: 1055
Re: System color to TFPColor
« Reply #2 on: November 13, 2014, 07:56:47 pm »
Ahh thank you circular!

 

TinyPortal © 2005-2018