Re: [fpc-pascal] red( clGrayText)
Em 01.12.2014 22:42, Mattias Gaertner escreveu: On Mon, 01 Dec 2014 22:01:15 -0200 Philippe phili...@quarta.com.br wrote: [...] http://wiki.lazarus.freepascal.org/Colors#System_colors [1][1] I have seen it ... but did not catch that it may not work with red( x) ... making it more simple, it means that the range of values used for those constants as clGrayText is not TColor compatible. Is that correct? clGrayText is a TColor, but TColor is not always a simple RGB value. System colors are context sensitive. You might try Red(ColorToRGB(clGrayText)); Mattias working fine ! Thank you. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal [2] Links: -- [1] http://wiki.lazarus.freepascal.org/Colors#System_colors [2] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[fpc-pascal] red( clGrayText)
using -Cr (Range Check) option, red( clGrayText) as example, throw an exception! how should I program red (or green, blue and may be some others) functions to avoid that? should I write red( clGrayText and $ff) ? ... another better way? Philippe ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] red( clGrayText)
On Mon, 01 Dec 2014 15:17:04 -0200 Philippe phili...@quarta.com.br wrote: using -Cr (Range Check) option, red( clGrayText) as example, throw an exception! how should I program red (or green, blue and may be some others) functions to avoid that? should I write red( clGrayText and $ff) ? ... another better way? Have you read this? http://wiki.lazarus.freepascal.org/Colors#System_colors Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] red( clGrayText)
Em 01.12.2014 20:04, Mattias Gaertner escreveu: On Mon, 01 Dec 2014 15:17:04 -0200 Philippe phili...@quarta.com.br wrote: using -Cr (Range Check) option, red( clGrayText) as example, throw an exception! how should I program red (or green, blue and may be some others) functions to avoid that? should I write red( clGrayText and $ff) ? ... another better way? Have you read this? http://wiki.lazarus.freepascal.org/Colors#System_colors [1] Mattias I have seen it ... but did not catch that it may not work with red( x) ... making it more simple, it means that the range of values used for those constants as clGrayText is not TColor compatible. Is that correct? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal [2] Links: -- [1] http://wiki.lazarus.freepascal.org/Colors#System_colors [2] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] red( clGrayText)
On Mon, 01 Dec 2014 22:01:15 -0200 Philippe phili...@quarta.com.br wrote: [...] http://wiki.lazarus.freepascal.org/Colors#System_colors [1] I have seen it ... but did not catch that it may not work with red( x) ... making it more simple, it means that the range of values used for those constants as clGrayText is not TColor compatible. Is that correct? clGrayText is a TColor, but TColor is not always a simple RGB value. System colors are context sensitive. You might try Red(ColorToRGB(clGrayText)); Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal