RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Graphics.IdentToColor Function

Translates the name of a color constant to the corresponding TColor value.

Pascal
function IdentToColor(const Ident: string; var Color: Longint): Boolean;
C++
Boolean IdentToColor(const AnsiString Ident, Longint Color);

Graphics

Call IdentToColor to reverse the translation performed by ColorToIdent. This method is useful for converting the strings generated by GetColorValues into useable TColor values. IdentToColor returns true if the Ident parameter is successfully converted into a color that is returned by the Color parameter. IdentToColor returns false if the Ident parameter is not the name of one of the TColor constants.

Note: If the string identifier for a color may represent either a hex value or a color constant, use the StringToColor function instead.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!