Skip to main content

TCustomdxPSExplorerItem.CannotRenameMessageText(string,string) Method

Returns the text displayed within the error message box when the item fails to be renamed.

Declaration

function CannotRenameMessageText(const AOldName: string; const ANewName: string): string; virtual;

Parameters

Name Type
AOldName string
ANewName string

Returns

Type
string

Remarks

End-users can rename folders and report items within the explorer’s tree view. This can be done by editing the captions of items. To start editing the selected item’s caption, end-users should either click on it or press the F2 key. When pressing the ENTER key or clicking outside of the edited item, changes are accepted. If the typed name cannot be assigned to the item, the error message box is displayed. This can take place for instance, if there is already an item with such a name within the same folder.

The text displayed within the error message box is specified by the CannotRenameMessageText method’s return value. The actual and potential item’s names are used to construct the message. These names are passed to the method as the AOldName and ANewName parameters respectively.

As implemented in the TCustomdxPSExplorerItem class, the CannotRenameMessageText method simply returns an empty string. Descendants override the method to construct proper error messages.

See Also