Skip to main content
A newer version of this page is available. .

cxGetResourceString(TcxResourceStringID) Method

Retrieves a resource string for the specified resource identifier.

Declaration

function cxGetResourceString(AResString: TcxResourceStringID): string;

Parameters

Name Type
AResString TcxResourceStringID

Returns

Type
string

Remarks

The cxGetResourceString function retrieves a resource string for the resource identifier specified by the ResString parameter. You pass the address of the resource string as the identifier

String constants for Express products are stored as resources. The cxGetResourceString function is used internally to retrieve strings for specific control elements. For instance, a date editor determines the caption to be displayed on the Clear button within the dropdown calendar by reading the value of the cxSDatePopupClear resource string as follows:

cxGetResourceString(@cxSDatePopupClear);

By default, it displays ‘Clear’.

For the purpose of localization, you can change the resource strings depending on the language and the regional settings. To do so, call the cxSetResourceString procedure passing a resource identifier and the new value of the resource string as parameters. This procedure substitutes the value of the resource string during execution only.

For instance, the following code specifies a new value for the cxSDatePopupClear resource string in the German language:

cxSetResourceString(@cxSDatePopupClear, 'Löschen');

Note

To easily localize applications that use standard, DevExpress or other third-party controls to any language supported by Windows, use the TcxLocalizer component.

See Also