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

IdentToCursor

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

Declaration

Source position: controls.pp line 2772

function IdentToCursor(

  const Ident: string;

  var Cursor: LongInt

):Boolean;

Arguments

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

CursorToString

  

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

StringToCursor

  

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

TCursor

  

Defines the range of values used for cursor shapes.

IntToIdent

IdentToInt


Version 3.2 Generated 2024-02-25 Home