Use RenameObject to rename the current object.
|
Parameters |
Description |
|
var NewName: UnicodeString |
the new name that should be set for the current object. |
The actual name of the current object after the attempt to rename it. It may happen that Windows does not allow the rename, then the old name will be returned. Otherwise the new name should be returned.
When you call RenameObject with a new name, the ShellBrowser tries to rename the current object. It may happen, that the windows shell doesn't allow the renaming. After calling RenameObject, you find the name the current object finally got in the variable NewName and the return value indicates if renaming was successful.
Let's say you have your files listed in a ListView, which property ReadOnly is false. The user can rename the objects in the ListView and you can use the Event OnEdited of the ListView to handle the renaming: