Forum > Beginners

How to rename default Form in Lazarus

(1/5) > >>

aag031:
Team

I observed the following behavior. When I create new GUI application Lazarus created default Form with class name TForm1 and variable Form1. I would like to rename this form to another name more suitable  for given project. If correct this name in source code of form, application does not start with message (screenshot has been attached) that "Form resource <new name> not found in resource
I found out that I should remove all  occurrence of old name from all project files manually and the cleanup and rebuilt project. After this manipulation project start correctly

Is there more suitable way for renaming default form?

Thank you in advance
Alex

Thaddy:
Use the OBJECT INSPECTOR ... silly. Dumbest question this year by far. I am not in the mood to explain such a silly question and actually answer it to you. Do it yourself. >:D >:D >:D >:D

PascalDragon:

--- Quote from: Thaddy on March 20, 2022, 12:11:50 pm ---Use the OBJECT INSPECTOR ... silly. Dumbest question this year by far. I am not in the mood to explain such a silly solution to you. Do it yourself.

--- End quote ---

If you're not in the mood then how about you don't answer at all instead of ranting at a user who just made one of their first posts and was genuinly looking for help because they simply didn't know what the right solution is?


--- Quote from: aag031 on March 20, 2022, 12:10:17 pm ---Is there more suitable way for renaming default form?

--- End quote ---

As Thaddy had implied: You should change the Name property of the form in the object inspector. This will automatically also update the source code.

dseligo:

--- Quote from: Thaddy on March 20, 2022, 12:11:50 pm ---Use the OBJECT INSPECTOR ... silly. Dumbest question this year by far. I am not in the mood to explain such a silly question and actually answer it to you. Do it yourself. >:D >:D >:D >:D

--- End quote ---

If you were born with all knowledge of the universe implanted in you, then you should also know that not everybody has such powers as you.
He wouldn't ask question if he knew the answer, would he?

Thaddy:
Bad case of "Sunday morning coming down", Kris Kristofferson, Sarah. Tnx for the explanation.

Navigation

[0] Message Index

[#] Next page

Go to full version