Skip to main content

Resource Strings

Strings displayed in various message boxes, dialogs and control elements of Express products are stored as resources. This allows you to easily substitute them with custom strings depending on your needs (for instance, for localization purposes).

To replace the default value of a specific resource string during program execution, use the cxSetResourceString procedure. This procedure works together with the cxGetResourceString function used by Express Controls. When controls need a specific string to display, they call the cxGetResourceString function, which returns either the overridden string or the default one (if the string was not overridden).

Resource strings are declared in separate files for individual Express Products. Refer to the Express Editors: Resource Strings topic for detailed information on resource strings available for the ExpressEditors library, their identifiers for the cxGetResourceString and cxSetResourceString methods, and default values.

Example

A date editor displays the Clear button in its dropdown. You can address the button’s caption using the cxSDatePopupClear identifier. The following code substitutes the caption of the button with its German equivalent:

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

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