Occurs before renaming component.
property OnCanRename: TRenameEvent;
Write an OnCanRename event handler to provide custom action. You may forbid renaming this component or set another name.
The Sender parameter is the object whose event handler is called.
The Component parameter is the component that is being renamed
The NewName parameter is the suggested name
The Accept parameter determines whether a component is allowed to rename.