IDEs like Lazarus and Delphi are limited code generators.
In those IDEs when an object is created, the IDE generates some code, often a named event, e.g, OnClick, OnWhatever, etc (but can also be a form or other object) which is in part determined by something, usually a name, in the object inspector.
One of the things to be keenly aware of is that, in the great majority of cases (maybe all?) this is a one way street because renaming in the source would necessitate not only continuous parsing of the Pascal source (codetools like) but, in addition to that the parser would have to keep track of which names were generated and which were programmer created. That's very difficult to accomplish and very error prone. Not only it is unclear that it may be possible, it isn't practical.
HTH.