[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Controls' (#lcl)

CursorToIdent

Uses a look-up table to find the cursor identifier corresponding to an Integer cursor constant.

Declaration

Source position: controls.pp line 2771

function CursorToIdent(

  Cursor: LongInt;

  var Ident: string

):Boolean;

Arguments

Cursor

  

Integer constant for the cursor shape (like crHourGlass).

Ident

  

Returns the string with the identifier name for the specified cursor shape (like 'crHourGlass').

Function result

Returns True if a valid identifier is found in the look-up table.

Description

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

IdentToCursor

  

Converts an identifier name for a cursor shape to its value as an Integer.

StringToCursor

  

StringToCursor - returns the cursor value corresponding to the name supplied.

CursorToString

  

Returns a string with the name for the cursor in the integer constant.

TCursor

  

Defines the range of values used for cursor shapes.

IntToIdent


Version 3.2 Generated 2024-02-25 Home