Skip to main content

cxSetResourceString(TcxResourceStringID,string) Method

Substitutes a value of the resource string retrieved by the cxGetResourceString function.

Declaration

procedure cxSetResourceString(AResString: TcxResourceStringID; const Value: string);

Parameters

Name Type Description
AResString TcxResourceStringID

The target resource string identifier.

Value string

The required resource string value.

Remarks

String constants for DevExpress products are stored as resources. The cxGetResourceString function is used internally to retrieve strings for specific control elements. You can call the cxSetResourceString procedure to substitute a value of a specific resource string during the program execution for localization purposes. Note that a new value does not replace a resource in an executable file.

Code Example

The cxEditConsts unit declares the cxSDatePopupClear resource string that identifies the Clear caption displayed in a button within the dropdown calendar of the date editor. To display the German equivalent of the string, you can call the cxSetResourceString procedure as follows:

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

This code changes the caption of the Clear button for all date editors in the current application.

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