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

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
AResString TcxResourceStringID
Value string

Remarks

String constants for Express products are stored as resources. The cxGetResourceString function is used internally to retrieve strings for specific control elements. You might use 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.

The ResString argument specifies a resource string identifier. You should pass an address of the resource string as the ResString parameter. A new value of the resource string is determined by Value.

In the cxEditConsts unit, the cxSDatePopupClear resource string is declared. By default, it identifies the ‘Clear’ string displayed in a button within the dropdown calendar of the date editor. To display the German equivalent of the string, you can use the cxSetResourceString procedure.

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