CursorToIdent function
Uses a look-up table to find the cursor identifier corresponding to an Integer cursor constant.
Declaration
function CursorToIdent(Cursor: LongInt; var Ident: string): BooleanDescription
CursorToIdent gets the identifier name for a cursor shape specified
as an Integer value. Cursor contains one of the Integer constants which
represent a value in the TCursor type. Ident is the String with the identifier
name for the cursor shape.
For example:
// var CursorName: String; IsOk: Boolean; CursorName := ''; IsOk := CursorToIdent(crHourGlass, CursorName); // CursorName returns 'crHourGlass'
CursorToIdent calls the IntToIdent routine in the RTL Classes
unit to get both the return value and the value for the Ident argument.
The CursorIdents implementation constant is used as the mapping table for the
integer and string values.
If Cursor is not found in the CursorIdents constant, the return value is False. If the numeric constant is not found in the look-up table, the value in Ident is not specified (or changed).
Use IdentToCursor or StringToCursor to convert the identifier name value back to an Integer value.
CursorToIdent is used in the implementation of the CursorToString routine.
See also
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
