N. McA.
N. McA.

Reputation: 4946

Where does Delphi store property information set at design time?

Whenever you set a property in the Object Inspector, it must be writing some code or somehow saving the information somewhere, but where? I want to know so I can set properties and events from code but the question is the one above. Where's the code?

Upvotes: 8

Views: 776

Answers (3)

Saurabh Rai
Saurabh Rai

Reputation: 41

Values of all the property stored into respective .dfm file. Right click on the DFM design time form and select view as text or you can directly open dfm file in notepad

Upvotes: 4

TLama
TLama

Reputation: 76663

It's in the Delphi form file. This file has the same name as your unit *.pas source code file but has the *.dfm extension.

The current source code of your form you will get also if you're in form designer and press ALT + F12. There you can modify what you need and with the same keystroke go back to the designer.

You can check also what other files might be generated by Delphi for your project here.

Upvotes: 22

Cray
Cray

Reputation: 2454

The object inspector does not write the "code" so much as it just saves your selections in the form data.

If you want to modify any properties from the code, just write

SomeObject.property = "sdfsdfsdf";

Upvotes: 5

Related Questions