IdentToCursor function
Converts an identifier name for a cursor shape to its value as an Integer.
Declaration
function IdentToCursor(const Ident: string; var Cursor: LongInt)
: BooleanArguments
Ident | The identifier name for the cursor shape, like 'crHourGlass'. |
Cursor | The numeric value of the named cursor, like crHourGlass. |
Function result
Returns True if a valid entry was found for the identifier name in the look-up table.
Description
IdentToCursor converts the identifier name for a cursor shape to
its Integer equivalent.
Ident contains the name for the cursor shape. The Cursor argument contains the TCursor value for the specified identifier name.
The return value is True if Ident is found in the CursorIdents look-up table. The value in Cursor is unspecified (and unchanged) when the return value is False.
For example:
// var CursorVal: Integer; IsOk: Boolean;
CursorVal := crDefault;
IsOk := IdentToCursor('crHourGlass', CursorVal);
// CursorVal contains the crHourGlass constant
IdenttoCursor calls the IdentToInt routine in the RTL Classes
unit to get both the return value and the value for the Cursor argument.
Use CursorToString or InttoIdent routines to return the Integer value to its string representation.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
